File tree 2 files changed +8
-0
lines changed
packages/react-scripts/config
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 11
11
'use strict' ;
12
12
13
13
const autoprefixer = require ( 'autoprefixer' ) ;
14
+ const path = require ( 'path' ) ;
14
15
const webpack = require ( 'webpack' ) ;
15
16
const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
16
17
const CaseSensitivePathsPlugin = require ( 'case-sensitive-paths-webpack-plugin' ) ;
@@ -72,6 +73,9 @@ module.exports = {
72
73
filename : 'static/js/bundle.js' ,
73
74
// This is the URL that app is served from. We use "/" in development.
74
75
publicPath : publicPath ,
76
+ // Point sourcemap entries to original disk location
77
+ devtoolModuleFilenameTemplate : info =>
78
+ path . relative ( paths . appSrc , info . absoluteResourcePath ) ,
75
79
} ,
76
80
resolve : {
77
81
// This allows you to set a fallback for where Webpack should look for modules.
Original file line number Diff line number Diff line change 11
11
'use strict' ;
12
12
13
13
const autoprefixer = require ( 'autoprefixer' ) ;
14
+ const path = require ( 'path' ) ;
14
15
const webpack = require ( 'webpack' ) ;
15
16
const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
16
17
const ExtractTextPlugin = require ( 'extract-text-webpack-plugin' ) ;
@@ -71,6 +72,9 @@ module.exports = {
71
72
chunkFilename : 'static/js/[name].[chunkhash:8].chunk.js' ,
72
73
// We inferred the "public path" (such as / or /my-project) from homepage.
73
74
publicPath : publicPath ,
75
+ // Point sourcemap entries to original disk location
76
+ devtoolModuleFilenameTemplate : info =>
77
+ path . relative ( paths . appSrc , info . absoluteResourcePath ) ,
74
78
} ,
75
79
resolve : {
76
80
// This allows you to set a fallback for where Webpack should look for modules.
You can’t perform that action at this time.
0 commit comments