File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 11var _ = require ( 'underscore' ) ;
22var path = require ( 'path' ) ;
3+ var sourcemaps = 'source-map'
34
5+ if ( process . argv . indexOf ( '-w' ) !== - 1 || process . argv . indexOf ( '-w' ) !== - 1 ) {
6+ console . log ( 'watch mode detected, will switch to cheep sourcemaps' )
7+ sourcemaps = 'eval-source-map' ;
8+
9+ }
410var commonConfig = {
511 resolve : {
612 root : [
@@ -44,7 +50,7 @@ function buildConfig(appName) {
4450 filename : 'main.min.js' ,
4551 path : './notebook/static/' + appName + '/js/built'
4652 } ,
47- devtool : 'eval-source-map' ,
53+ devtool : sourcemaps ,
4854 } ) ;
4955}
5056
@@ -61,7 +67,7 @@ module.exports = [
6167 path : './notebook/static/services/built' ,
6268 libraryTarget : 'amd'
6369 } ,
64- devtool : 'eval-source-map' ,
70+ devtool : sourcemaps ,
6571 } ) ,
6672 _ . extend ( { } , commonConfig , {
6773 entry : './notebook/static/index.js' ,
@@ -70,6 +76,6 @@ module.exports = [
7076 path : './notebook/static/built' ,
7177 libraryTarget : 'amd'
7278 } ,
73- devtool : 'eval-source-map' ,
79+ devtool : sourcemaps ,
7480 } ) ,
7581] . map ( buildConfig ) ;
You can’t perform that action at this time.
0 commit comments