From ec7731f8feb10056493602a9a1cb77a834f6b12d Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 19 May 2017 17:57:58 +0100 Subject: [PATCH] Work around Windows path issue in SWPrecacheWebpackPlugin (#2255) --- packages/react-scripts/config/webpack.config.prod.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index ac672a4099a..6a119d71ce8 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -319,6 +319,9 @@ module.exports = { minify: true, navigateFallback: publicUrl + '/index.html', staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/], + // Work around Windows path issue in SWPrecacheWebpackPlugin: + // https://github.com/facebookincubator/create-react-app/issues/2235 + stripPrefix: path.join(paths.appBuild).replace(/\\/g, '/'), }), // Moment.js is an extremely popular library that bundles large locale files // by default due to how Webpack interprets its code. This is a practical