Skip to content

Commit e069e35

Browse files
authored
sw-precache: don't fallback if URL starts with /api
1 parent a51be95 commit e069e35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: packages/react-scripts/config/webpack.config.prod.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ module.exports = {
340340
navigateFallback: publicUrl + '/index.html',
341341
// Ignores URLs starting from /__ (useful for Firebase):
342342
// https://github.com/facebookincubator/create-react-app/issues/2237#issuecomment-302693219
343-
navigateFallbackWhitelist: [/^(?!\/__).*/],
343+
navigateFallbackWhitelist: [/^(?!\/(__|api)).*/],
344344
// Don't precache sourcemaps (they're large) and build asset manifest:
345345
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/],
346346
}),

0 commit comments

Comments
 (0)