Skip to content

Commit

Permalink
Add navigateFallbackWhitelist /__* to SW Precache config (facebook#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 romaindso committed Jul 10, 2017
1 parent 3d05ec2 commit 88bc50a
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 88bc50a

Please sign in to comment.