Skip to content

Commit be48fcc

Browse files
committed
Add warning if no filtering happens
Former-commit-id: 335ba16
1 parent f20de2e commit be48fcc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gatsby-node.js

+4
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,10 @@ exports.onPostBuild = async ({ reporter, pathPrefix }) => {
424424
.filter((line) => !line.startsWith(`${pathPrefix}/edb-docs/`))
425425
.join('\n');
426426

427+
if (filteredRedirects.length === originalRedirects.length) {
428+
reporter.warn('no redirects were filtered out, did something change?');
429+
}
430+
427431
await writeFile(
428432
'public/_redirects',
429433
`${filteredRedirects}\n\n# Netlify pathPrefix path rewrite\n${pathPrefix}/* /:splat 200`,

0 commit comments

Comments
 (0)