mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-05-17 03:15:16 +08:00
Fix RegExp from navigateFallbackBlacklist (workbox) (#7176)
Exclude URLs that contains a "?" character.
This commit is contained in:
committed by
Ian Sutherland
parent
9678bbb4bf
commit
efaee65e90
@@ -664,9 +664,11 @@ module.exports = function(webpackEnv) {
|
||||
navigateFallbackBlacklist: [
|
||||
// Exclude URLs starting with /_, as they're likely an API call
|
||||
new RegExp('^/_'),
|
||||
// Exclude URLs containing a dot, as they're likely a resource in
|
||||
// public/ and not a SPA route
|
||||
new RegExp('/[^/]+\\.[^/]+$'),
|
||||
// Exclude any URLs whose last part seems to be a file extension
|
||||
// as they're likely a resource and not a SPA route.
|
||||
// URLs containing a "?" character won't be blacklisted as they're likely
|
||||
// a route with query params (e.g. auth callbacks).
|
||||
new RegExp('/[^/?]+\\.[^/]+$'),
|
||||
],
|
||||
}),
|
||||
// TypeScript type checking
|
||||
|
||||
Reference in New Issue
Block a user