Skip to content

Commit

Permalink
Merge pull request shadowwalker#333 from ihavecoke/master
Browse files Browse the repository at this point in the history
fixed buildExcludes options not working
  • Loading branch information
mnphpexpert committed Mar 11, 2022
2 parents 34aafa5 + a0456e6 commit 07df22f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module.exports = (nextConfig = {}) => ({
}

console.log(`> [PWA] Compile ${options.isServer ? 'server' : 'client (static)'}`)

let { runtimeCaching = defaultCache } = pwa
const _scope = path.posix.join(scope, '/')

Expand Down Expand Up @@ -194,6 +194,7 @@ module.exports = (nextConfig = {}) => ({
swDest: path.join(_dest, sw),
additionalManifestEntries: dev ? [] : manifestEntries,
exclude: [
...buildExcludes
({ asset, compilation }) => {
if (asset.name.match(/^(build-manifest\.json|react-loadable-manifest\.json|server\/middleware-manifest\.json|server\/middleware-runtime\.js|_middleware\.js|server\/pages\/_middleware\.js)$/)) {
return true
Expand All @@ -210,8 +211,7 @@ module.exports = (nextConfig = {}) => ({
}
}
return false
},
...buildExcludes
}
],
modifyURLPrefix: {
...modifyURLPrefix,
Expand Down

0 comments on commit 07df22f

Please sign in to comment.