Skip to content

Commit ce9fdca

Browse files
mxstbrgaearon
authored andcommitted
Fix webpack config
1 parent 9317d10 commit ce9fdca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

config/webpack.config.dev.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ var autoprefixer = require('autoprefixer');
1212
var webpack = require('webpack');
1313
var HtmlWebpackPlugin = require('html-webpack-plugin');
1414

15+
function isInDebugMode() {
16+
return process.argv.some(function (item) { return item.indexOf('--debug-template') > -1 });
17+
}
18+
1519
// TODO: hide this behind a flag and eliminate dead code on eject.
1620
// This shouldn't be exposed to the user.
1721
var isInNodeModules = 'node_modules' ===
1822
path.basename(path.resolve(path.join(__dirname, '..', '..')));
1923
var relativePath = isInNodeModules ? '../../..' : '..';
20-
if (process.argv[2] === '--debug-template') {
24+
if (isInDebugMode()) {
2125
relativePath = '../template';
2226
}
2327
var srcPath = path.resolve(__dirname, relativePath, 'src');

0 commit comments

Comments
 (0)