We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9317d10 commit ce9fdcaCopy full SHA for ce9fdca
config/webpack.config.dev.js
@@ -12,12 +12,16 @@ var autoprefixer = require('autoprefixer');
12
var webpack = require('webpack');
13
var HtmlWebpackPlugin = require('html-webpack-plugin');
14
15
+function isInDebugMode() {
16
+ return process.argv.some(function (item) { return item.indexOf('--debug-template') > -1 });
17
+}
18
+
19
// TODO: hide this behind a flag and eliminate dead code on eject.
20
// This shouldn't be exposed to the user.
21
var isInNodeModules = 'node_modules' ===
22
path.basename(path.resolve(path.join(__dirname, '..', '..')));
23
var relativePath = isInNodeModules ? '../../..' : '..';
-if (process.argv[2] === '--debug-template') {
24
+if (isInDebugMode()) {
25
relativePath = '../template';
26
}
27
var srcPath = path.resolve(__dirname, relativePath, 'src');
0 commit comments