Skip to content

Commit

Permalink
Revert "Update copy-webpack-plugin to v6 (#276)"
Browse files Browse the repository at this point in the history
This reverts commit 4df5e1b.
  • Loading branch information
hanford committed Apr 13, 2021
1 parent f98d57b commit 7da7c95
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 325 deletions.
4 changes: 2 additions & 2 deletions packages/next-offline/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ module.exports = (nextConfig = {}) => ({
// Generate SW
if (skipDuringDevelopment) {
// Simply copy development service worker.
config.plugins.push(new CopyWebpackPlugin({ patterns: [devSwSrc] }));
config.plugins.push(new CopyWebpackPlugin([devSwSrc]));
} else if (!options.isServer) {
// Only run once for the client build.
config.plugins.push(
// Workbox uses Webpack's asset manifest to generate the SW's pre-cache manifest, so we need
// to copy the app's assets into the Webpack context so those are picked up.
new CopyWebpackPlugin({ patterns: [{ from: `${join(cwd(), nextAssetDirectory)}/**/*` }] }),
new CopyWebpackPlugin([{ from: `${join(cwd(), nextAssetDirectory)}/**/*` }]),
generateSw
? new GenerateSW({ ...defaultGenerateOpts, ...workboxOpts })
: new InjectManifest({ ...defaultInjectOpts, ...workboxOpts }),
Expand Down
2 changes: 1 addition & 1 deletion packages/next-offline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"webpack": "^4.19.1"
},
"dependencies": {
"copy-webpack-plugin": "^6.4.1",
"copy-webpack-plugin": "~5.1.2",
"fs-extra": "~8.1.0",
"workbox-webpack-plugin": "^5.0.0"
}
Expand Down
Loading

0 comments on commit 7da7c95

Please sign in to comment.