mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-05-07 13:15:52 +08:00
Add navigateFallbackWhitelist /__* to SW Precache config (#2347)
* Add navigateFallbackWhitelist /__* to SW Precache config * Add comments
This commit is contained in:
committed by
Dan Abramov
parent
0d2989ba6d
commit
55fe1369d7
@@ -319,7 +319,12 @@ module.exports = {
|
||||
console.log(message);
|
||||
},
|
||||
minify: true,
|
||||
// For unknown URLs, fallback to the index page
|
||||
navigateFallback: publicUrl + '/index.html',
|
||||
// Ignores URLs starting from /__ (useful for Firebase):
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2237#issuecomment-302693219
|
||||
navigateFallbackWhitelist: [/^(?!\/__).*/],
|
||||
// Don't precache sourcemaps (they're large) and build asset manifest:
|
||||
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/],
|
||||
// Work around Windows path issue in SWPrecacheWebpackPlugin:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2235
|
||||
|
||||
Reference in New Issue
Block a user