Skip to content

Commit

Permalink
build: set inline source maps on dev
Browse files Browse the repository at this point in the history
  • Loading branch information
fent committed Oct 14, 2018
1 parent 5b48fbf commit e644f6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path');

module.exports = {
module.exports = (env, argv) => ({
entry: {
main: './src/js/chrome-options.js',
styles: './src/css/chrome-options.css'
Expand All @@ -9,7 +9,7 @@ module.exports = {
filename: '[name].min.js',
path: path.resolve(__dirname, './dist')
},
devtool: 'inline-source-map',
devtool: `${argv.mode === 'production' ? '' : 'inline-'}source-map`,
module: {
rules: [
{
Expand All @@ -26,4 +26,4 @@ module.exports = {
}
]
}
};
});

0 comments on commit e644f6f

Please sign in to comment.