Skip to content

Commit 5029aed

Browse files
committed
update offline plugin config
1 parent b836037 commit 5029aed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

+7-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,13 @@ module.exports = {
261261
new ManifestPlugin({
262262
fileName: 'asset-manifest.json'
263263
}),
264-
new OfflinePlugin()
264+
new OfflinePlugin({
265+
publicPath: publicPath,
266+
relativePaths: false,
267+
ServiceWorker: {
268+
scope: publicPath
269+
}
270+
})
265271
],
266272
// Some libraries import Node modules but don't use them in the browser.
267273
// Tell Webpack to provide empty mocks for them so importing them works.

0 commit comments

Comments
 (0)