Skip to content

Commit 14b113c

Browse files
chore: remove CommonsChunk plugin karma workaround
1 parent 58185d7 commit 14b113c

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

common/static/common/js/karma.common.conf.js

-15
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,6 @@ var firefox = require('selenium-webdriver/firefox');
4949

5050
var webpackConfig = require(path.join(appRoot, 'webpack.dev.config.js'));
5151

52-
// The following crazy bit is to work around the webpack.optimize.CommonsChunkPlugin
53-
// plugin. The problem is that it it factors out the code that defines webpackJsonp
54-
// and puts in in the commons JS, which Karma doesn't know to load first. This is a
55-
// workaround recommended in the karma-webpack bug report that basically just removes
56-
// the plugin for the purposes of Karma testing (the plugin is meant to be an
57-
// optimization only).
58-
// https://github.com/webpack-contrib/karma-webpack/issues/24#issuecomment-257613167
59-
//
60-
// This should be fixed in v3 of karma-webpack
61-
var commonsChunkPluginIndex = webpackConfig[0].plugins.findIndex(function(plugin) { return plugin.chunkNames; });
62-
6352
// Files which are needed by all lms/cms suites.
6453
var commonFiles = {
6554
libraryFiles: [
@@ -83,10 +72,6 @@ var commonFiles = {
8372
]
8473
};
8574

86-
webpackConfig[0].plugins.splice(commonsChunkPluginIndex, 1);
87-
88-
delete webpackConfig[0].entry;
89-
9075
/**
9176
* Customize the name attribute in xml testcase element
9277
* @param {Object} browser

0 commit comments

Comments
 (0)