Skip to content

Commit

Permalink
Use same signature for webpack.dev.js and webpack.prod.js
Browse files Browse the repository at this point in the history
  • Loading branch information
gberaudo committed Dec 12, 2018
1 parent c4e92a7 commit 8531beb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
26 changes: 14 additions & 12 deletions buildtools/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ const loaderOptionsPlugin = new webpack.LoaderOptionsPlugin({
debug: false
});


module.exports = {
mode: 'development',
output: {
filename: '[name].js'
},
module: {
rules: [
resourcesRule,
]
},
};
// Same signature as for webpack.prod.js
module.exports = function(_) {
return {
mode: 'development',
output: {
filename: '[name].js'
},
module: {
rules: [
resourcesRule,
]
},
};
}
1 change: 1 addition & 0 deletions buildtools/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const fontRule = {
}
};

// Same signature as for webpack.dev.js
module.exports = function(UglifyJsPluginCache) {
return {
mode: 'production',
Expand Down
3 changes: 2 additions & 1 deletion karma-conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ var isDebug = process.argv.some(function(argument) {

const webpackMerge = require('webpack-merge');
const commons = require('./buildtools/webpack.commons');
let webpackConfig = commons.config();
let webpackConfig = commons.config({}, false);

webpackConfig = webpackMerge(webpackConfig, require('./buildtools/webpack.dev'));
webpackConfig = webpackMerge(webpackConfig, {
devtool: 'inline-source-map',
Expand Down

0 comments on commit 8531beb

Please sign in to comment.