Consolidate worker-targetting webpack config in common

This changes the production config. Spooky scary!
This commit is contained in:
Matt Hughes
2018-11-15 16:48:32 -05:00
committed by Dave St.Germain
parent edd15f1bdb
commit 658fd6c139
3 changed files with 39 additions and 33 deletions

View File

@@ -7,10 +7,12 @@ var path = require('path');
var webpack = require('webpack');
// TODO: remove once common worker settings moved into common
var BundleTracker = require('webpack-bundle-tracker');
var _ = require('underscore');
var commonConfig = require('./webpack.common.config.js');
module.exports = [Merge.smart(commonConfig, {
module.exports = _.values(Merge.smart(commonConfig, {
web: {
output: {
filename: '[name].js'
},
@@ -59,28 +61,4 @@ module.exports = [Merge.smart(commonConfig, {
watchOptions: {
ignored: [/node_modules/, /\.git/]
}
}),
{
target: "webworker",
context: __dirname,
entry: {
mockprock: './node_modules/edx-proctoring/edx_proctoring/static/proctoring/js/plugin/mockprock-provider.js',
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'common/static/bundles'),
},
plugins: [
new BundleTracker({
path: process.env.STATIC_ROOT_LMS,
filename: 'webpack-worker-stats.json'
})
],
resolve: {
extensions: ['.js'],
modules: [
'node_modules',
'node_modules/edx-proctoring/node_modules'
]
}
}];
}}));