Skip to content

Commit b1ebfc1

Browse files
committed
Remove unsupported importWorkboxFrom property from configuration of WorkboxWebpackPlugin.GenerateSW plugin
1 parent bb37463 commit b1ebfc1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,12 @@ module.exports = function(webpackEnv) {
674674
new WorkboxWebpackPlugin.GenerateSW({
675675
clientsClaim: true,
676676
exclude: [/\.map$/, /asset-manifest\.json$/],
677-
importWorkboxFrom: 'cdn',
677+
// A number of `workbox-build`, `workbox-cli`, and `workbox-webpack-plugin` configuration parameters are no longer supported,
678+
// following the general outlines of the changes described above.
679+
// For instance, generateSW will always create a local Workbox runtime bundle for you, so the importWorkboxFrom option no longer
680+
// makes sense. Please consult the relevant tool's documentation for the list of supported options.
681+
// See: https://github.com/GoogleChrome/workbox/releases/tag/v5.0.0
682+
// importWorkboxFrom: 'cdn',
678683
navigateFallback: paths.publicUrlOrPath + 'index.html',
679684
navigateFallbackDenylist: [
680685
// Exclude URLs starting with /_, as they're likely an API call

0 commit comments

Comments
 (0)