webpack update to switch on mode for devtool

This commit is contained in:
Ken
2019-02-23 08:09:58 -08:00
parent 5c356156d8
commit 023233d573

View File

@@ -39,7 +39,7 @@ fs.readdirSync('./').filter(step => {
} }
}); });
module.exports = function() { module.exports = function(env, argv) {
return { return {
entry: { ...entries, markdownReadme: './markdownReadme/src/index.ts' }, entry: { ...entries, markdownReadme: './markdownReadme/src/index.ts' },
module: { module: {
@@ -116,6 +116,6 @@ module.exports = function() {
inline: true inline: true
}, },
stats: 'minimal', stats: 'minimal',
devtool: process.env.NODE_ENV === 'development' ? 'eval' : 'source-map' devtool: argv.mode === 'development' ? 'eval' : 'source-map'
}; };
}; };