Skip to content

Commit 9dbe84f

Browse files
committed
Disable navigationFallback and navigationFallbackWhitelist in prod
webpack config by default. See facebook/create-react-app#3419
1 parent eb34688 commit 9dbe84f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

config/webpack.config.prod.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -368,13 +368,12 @@ module.exports = {
368368
console.log(message);
369369
},
370370
minify: true,
371-
// For unknown URLs, fallback to the index page
372-
navigateFallback: publicUrl + '/index.html',
373-
// Ignores URLs starting from /__ (useful for Firebase):
374-
// https://github.com/facebookincubator/create-react-app/issues/2237#issuecomment-302693219
375-
navigateFallbackWhitelist: [/^(?!\/__).*/],
376371
// Don't precache sourcemaps (they're large) and build asset manifest:
377372
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/],
373+
// `navigateFallback` and `navigateFallbackWhitelist` are disabled by default; see
374+
// https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#service-worker-considerations
375+
// navigateFallback: publicUrl + '/index.html',
376+
// navigateFallbackWhitelist: [/^(?!\/__).*/],
378377
}),
379378
// Moment.js is an extremely popular library that bundles large locale files
380379
// by default due to how Webpack interprets its code. This is a practical

0 commit comments

Comments
 (0)