Skip to content

Commit

Permalink
Add navigateFallbackWhitelist /__* to SW Precache config (#2347)
Browse files Browse the repository at this point in the history
* Add navigateFallbackWhitelist /__* to SW Precache config

* Add comments
  • Loading branch information
ryansully authored and gaearon committed May 24, 2017
1 parent 0d2989b commit 55fe136
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 55fe136

Please sign in to comment.