diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 3de2775e030..446fd5ca39d 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -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