File tree Expand file tree Collapse file tree
packages/react-scripts/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111'use strict' ;
1212
1313const autoprefixer = require ( 'autoprefixer' ) ;
14+ const path = require ( 'path' ) ;
1415const webpack = require ( 'webpack' ) ;
1516const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
1617const CaseSensitivePathsPlugin = require ( 'case-sensitive-paths-webpack-plugin' ) ;
@@ -72,6 +73,9 @@ module.exports = {
7273 filename : 'static/js/bundle.js' ,
7374 // This is the URL that app is served from. We use "/" in development.
7475 publicPath : publicPath ,
76+ // Point sourcemap entries to original disk location
77+ devtoolModuleFilenameTemplate : info =>
78+ path . relative ( paths . appSrc , info . absoluteResourcePath ) ,
7579 } ,
7680 resolve : {
7781 // This allows you to set a fallback for where Webpack should look for modules.
Original file line number Diff line number Diff line change 1111'use strict' ;
1212
1313const autoprefixer = require ( 'autoprefixer' ) ;
14+ const path = require ( 'path' ) ;
1415const webpack = require ( 'webpack' ) ;
1516const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
1617const ExtractTextPlugin = require ( 'extract-text-webpack-plugin' ) ;
@@ -71,6 +72,9 @@ module.exports = {
7172 chunkFilename : 'static/js/[name].[chunkhash:8].chunk.js' ,
7273 // We inferred the "public path" (such as / or /my-project) from homepage.
7374 publicPath : publicPath ,
75+ // Point sourcemap entries to original disk location
76+ devtoolModuleFilenameTemplate : info =>
77+ path . relative ( paths . appSrc , info . absoluteResourcePath ) ,
7478 } ,
7579 resolve : {
7680 // 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