File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,16 @@ var autoprefixer = require('autoprefixer');
12
12
var webpack = require ( 'webpack' ) ;
13
13
var HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
14
14
15
+ function isInDebugMode ( ) {
16
+ return process . argv . some ( function ( item ) { return item . indexOf ( '--debug-template' ) > - 1 } ) ;
17
+ }
18
+
15
19
// TODO: hide this behind a flag and eliminate dead code on eject.
16
20
// This shouldn't be exposed to the user.
17
21
var isInNodeModules = 'node_modules' ===
18
22
path . basename ( path . resolve ( path . join ( __dirname , '..' , '..' ) ) ) ;
19
23
var relativePath = isInNodeModules ? '../../..' : '..' ;
20
- if ( process . argv [ 2 ] === '--debug-template' ) {
24
+ if ( isInDebugMode ( ) ) {
21
25
relativePath = '../template' ;
22
26
}
23
27
var srcPath = path . resolve ( __dirname , relativePath , 'src' ) ;
You can’t perform that action at this time.
0 commit comments