Skip to content

Commit 22ca584

Browse files
authored
Work around Windows path issue in SWPrecacheWebpackPlugin (#2255)
1 parent c749de7 commit 22ca584

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,9 @@ module.exports = {
319319
minify: true,
320320
navigateFallback: publicUrl + '/index.html',
321321
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/],
322+
// Work around Windows path issue in SWPrecacheWebpackPlugin:
323+
// https://github.com/facebookincubator/create-react-app/issues/2235
324+
stripPrefix: path.join(paths.appBuild).replace(/\\/g, '/'),
322325
}),
323326
// Moment.js is an extremely popular library that bundles large locale files
324327
// by default due to how Webpack interprets its code. This is a practical

0 commit comments

Comments
 (0)