Add navigateFallbackWhitelist /__* to SW Precache config (#2347)

* Add navigateFallbackWhitelist /__* to SW Precache config

* Add comments
This commit is contained in:
Ryan Sullivan
2017-05-24 05:07:45 -07:00
committed by Dan Abramov
parent 0d2989ba6d
commit 55fe1369d7

View File

@@ -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