Skip to content

Commit efaee65

Browse files
nuragiciansu
authored andcommitted
Fix RegExp from navigateFallbackBlacklist (workbox) (#7176)
Exclude URLs that contains a "?" character.
1 parent 9678bbb commit efaee65

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/react-scripts/config/webpack.config.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -664,9 +664,11 @@ module.exports = function(webpackEnv) {
664664
navigateFallbackBlacklist: [
665665
// Exclude URLs starting with /_, as they're likely an API call
666666
new RegExp('^/_'),
667-
// Exclude URLs containing a dot, as they're likely a resource in
668-
// public/ and not a SPA route
669-
new RegExp('/[^/]+\\.[^/]+$'),
667+
// Exclude any URLs whose last part seems to be a file extension
668+
// as they're likely a resource and not a SPA route.
669+
// URLs containing a "?" character won't be blacklisted as they're likely
670+
// a route with query params (e.g. auth callbacks).
671+
new RegExp('/[^/?]+\\.[^/]+$'),
670672
],
671673
}),
672674
// TypeScript type checking

0 commit comments

Comments
 (0)