From 22ca584b2b8db5cb6dfa601412a72e6947054cf9 Mon Sep 17 00:00:00 2001
From: Dan Abramov <dan.abramov@gmail.com>
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 ac672a409..6a119d71c 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
-- 
GitLab