Consolidate worker-targetting webpack config in common
This changes the production config. Spooky scary!
This commit is contained in:
committed by
Dave St.Germain
parent
edd15f1bdb
commit
658fd6c139
@@ -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'
|
||||
]
|
||||
}
|
||||
}];
|
||||
}}));
|
||||
|
||||
Reference in New Issue
Block a user