Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Commit 03039aa

Browse files
pluscubedwmonk
authored andcommittedAug 7, 2017
Fix sourcemap directory organizing on Windows (#2456) (#2610)
* Fix sourcemap directory organizing on Windows * Update comments
1 parent 2a4fe99 commit 03039aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ module.exports = {
7676
chunkFilename: 'static/js/[name].chunk.js',
7777
// This is the URL that app is served from. We use "/" in development.
7878
publicPath: publicPath,
79-
// Point sourcemap entries to original disk location
79+
// Point sourcemap entries to original disk location (format as URL on Windows)
8080
devtoolModuleFilenameTemplate: info =>
81-
path.resolve(info.absoluteResourcePath),
81+
path.resolve(info.absoluteResourcePath).replace(/\\/g, '/'),
8282
},
8383
resolve: {
8484
// This allows you to set a fallback for where Webpack should look for modules.

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ module.exports = {
7474
chunkFilename: 'static/js/[name].[chunkhash:8].chunk.js',
7575
// We inferred the "public path" (such as / or /my-project) from homepage.
7676
publicPath: publicPath,
77-
// Point sourcemap entries to original disk location
77+
// Point sourcemap entries to original disk location (format as URL on Windows)
7878
devtoolModuleFilenameTemplate: info =>
79-
path.relative(paths.appSrc, info.absoluteResourcePath),
79+
path.relative(paths.appSrc, info.absoluteResourcePath).replace(/\\/g, '/'),
8080
},
8181
resolve: {
8282
// This allows you to set a fallback for where Webpack should look for modules.

0 commit comments

Comments
 (0)