Skip to content

Commit 8498d57

Browse files
author
Marlon Maxwel
committed
fix resolve template and depreciated workbox config
1 parent c62f86f commit 8498d57

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/react-scripts/config/paths.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ if (
137137
ownNodeModules: resolveOwn('node_modules'),
138138
appTypeDeclarations: resolveOwn(`${templatePath}/src/react-app-env.d.ts`),
139139
ownTypeDeclarations: resolveOwn('lib/react-app.d.ts'),
140-
serviceWorkerTemplate: resolveModule(resolveApp, 'src/sw-template'),
140+
serviceWorkerTemplate: resolveModule(
141+
resolveOwn,
142+
`${templatePath}/src/sw-template`
143+
),
141144
};
142145
}
143146
// @remove-on-eject-end

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,6 @@ module.exports = function(webpackEnv) {
678678
new WorkboxWebpackPlugin.GenerateSW({
679679
clientsClaim: true,
680680
exclude: [/\.map$/, /asset-manifest\.json$/],
681-
importWorkboxFrom: 'cdn',
682681
navigateFallback: paths.publicUrlOrPath + 'index.html',
683682
navigateFallbackDenylist: [
684683
// Exclude URLs starting with /_, as they're likely an API call

0 commit comments

Comments
 (0)