Merge pull request #1818 from open-sausages/pulls/4/fix-webpack-dev-config

BUGFIX: Get rid of special dev webpack plugins
This commit is contained in:
Damian Mooyman 2017-05-12 17:17:02 +12:00 committed by GitHub
commit d539109455

View File

@ -2,21 +2,6 @@ const webpack = require('webpack');
const Config = require('./webpack.config');
if (Array.isArray(Config)) {
const jsConfig = Config.find((item) => item.name === 'js');
jsConfig.plugins = [
new webpack.ProvidePlugin({
jQuery: 'jQuery',
$: 'jQuery',
}),
// Most vendor libs are loaded directly into the 'vendor' bundle (through require() calls in vendor.js).
// This ensures that any further require() calls in other bundles aren't duplicating libs.
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: Infinity,
}),
];
for (var i = 0; i < Config.length; i++) {
Config[i].devtool = 'source-map';
}