File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ const common = {
1717 // the filename template for entry chunks
1818 filename : '[name].js' ,
1919 } ,
20- devtool : 'source-map' ,
2120 stats : {
2221 all : false ,
2322 errors : true ,
Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ const common = require('./webpack.common.js');
66const PATHS = require ( './paths' ) ;
77
88// Merge webpack configuration files
9- const config = merge ( common , {
9+ const config = ( env , argv ) => merge ( common , {
1010 entry : {
1111 devtools : PATHS . src + '/devtools.js' ,
1212 panel : PATHS . src + '/panel.js' ,
1313 background : PATHS . src + '/background.js' ,
1414 } ,
15+ devtool : argv . mode === 'production' ? false : 'source-map'
1516} ) ;
1617
1718module . exports = config ;
Original file line number Diff line number Diff line change @@ -6,11 +6,12 @@ const common = require('./webpack.common.js');
66const PATHS = require ( './paths' ) ;
77
88// Merge webpack configuration files
9- const config = merge ( common , {
9+ const config = ( env , argv ) => merge ( common , {
1010 entry : {
1111 app : PATHS . src + '/app.js' ,
1212 background : PATHS . src + '/background.js' ,
1313 } ,
14+ devtool : argv . mode === 'production' ? false : 'source-map'
1415} ) ;
1516
1617module . exports = config ;
Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ const common = require('./webpack.common.js');
66const PATHS = require ( './paths' ) ;
77
88// Merge webpack configuration files
9- const config = merge ( common , {
9+ const config = ( env , argv ) => merge ( common , {
1010 entry : {
1111 popup : PATHS . src + '/popup.js' ,
1212 contentScript : PATHS . src + '/contentScript.js' ,
1313 background : PATHS . src + '/background.js' ,
1414 } ,
15+ devtool : argv . mode === 'production' ? false : 'source-map'
1516} ) ;
1617
1718module . exports = config ;
You can’t perform that action at this time.
0 commit comments