summaryrefslogtreecommitdiff
path: root/config/karma.config.js
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-03-02 15:12:49 -0600
committerMike Greiling <mike@pixelcog.com>2018-05-01 15:14:58 -0500
commit50889179df671a29175ea69b9187a2eb67e652f0 (patch)
tree4c2473a1757693a6d682f24c2e040786a3d51ce0 /config/karma.config.js
parenta6c6e29c97a3736862eb690fe2c46927907751ab (diff)
downloadgitlab-ce-50889179df671a29175ea69b9187a2eb67e652f0.tar.gz
adjust webpack config
Diffstat (limited to 'config/karma.config.js')
-rw-r--r--config/karma.config.js21
1 files changed, 8 insertions, 13 deletions
diff --git a/config/karma.config.js b/config/karma.config.js
index 3eb220eed99..28a688797d9 100644
--- a/config/karma.config.js
+++ b/config/karma.config.js
@@ -12,16 +12,14 @@ function fatalError(message) {
process.exit(1);
}
-// remove problematic plugins
-if (webpackConfig.plugins) {
- webpackConfig.plugins = webpackConfig.plugins.filter(function(plugin) {
- return !(
- plugin instanceof webpack.optimize.CommonsChunkPlugin ||
- plugin instanceof webpack.optimize.ModuleConcatenationPlugin ||
- plugin instanceof webpack.DefinePlugin
- );
- });
-}
+// disable problematic options
+webpackConfig.entry = undefined;
+webpackConfig.mode = 'development';
+webpackConfig.optimization.runtimeChunk = false;
+webpackConfig.optimization.splitChunks = false;
+
+// use quicker sourcemap option
+webpackConfig.devtool = 'cheap-inline-source-map';
const specFilters = argumentsParser
.option(
@@ -77,9 +75,6 @@ if (specFilters.length) {
);
}
-webpackConfig.entry = undefined;
-webpackConfig.devtool = 'cheap-inline-source-map';
-
// Karma configuration
module.exports = function(config) {
process.env.TZ = 'Etc/UTC';