diff options
author | sarahghp <sarah.groff.palermo@gmail.com> | 2019-05-28 16:31:03 -0400 |
---|---|---|
committer | sarahghp <sarah.groff.palermo@gmail.com> | 2019-05-29 11:24:06 -0400 |
commit | fbb95ed57310d7b27c83ba24b317f993ec936716 (patch) | |
tree | f6f66e217bd8c37dd2a967610db5537d87527928 | |
parent | 6fe7d13ab58bc7139e933a1e891b31d3dc2d2bc3 (diff) | |
download | gitlab-ce-fbb95ed57310d7b27c83ba24b317f993ec936716.tar.gz |
Revert "Build visual_review_toolbar with webpack"
This reverts commit 0a0e436ba5d4e58801dc9c89365bc2e95a8e6929.
-rw-r--r-- | config/karma.config.js | 2 | ||||
-rw-r--r-- | config/webpack.config.js | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/config/karma.config.js b/config/karma.config.js index 167664ff3fe..2a5bf3581e0 100644 --- a/config/karma.config.js +++ b/config/karma.config.js @@ -3,7 +3,7 @@ const glob = require('glob'); const chalk = require('chalk'); const webpack = require('webpack'); const argumentsParser = require('commander'); -const webpackConfig = require('./webpack.config.js').find(config => config.name === 'main'); +const webpackConfig = require('./webpack.config.js'); const IS_EE = require('./helpers/is_ee_env'); const ROOT_PATH = path.resolve(__dirname, '..'); diff --git a/config/webpack.config.js b/config/webpack.config.js index 896f832c749..9caec679915 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -105,15 +105,15 @@ if (IS_EE) { }); } -const mainConfig = { - ...baseConfig, +module.exports = { + mode: IS_PRODUCTION ? 'production' : 'development', - name: 'main', + context: path.join(ROOT_PATH, 'app/assets/javascripts'), entry: generateEntries, output: { - ...baseConfig.output, + path: path.join(ROOT_PATH, 'public/assets/webpack'), publicPath: '/assets/webpack/', filename: IS_PRODUCTION ? '[name].[chunkhash:8].bundle.js' : '[name].bundle.js', chunkFilename: IS_PRODUCTION ? '[name].[chunkhash:8].chunk.js' : '[name].chunk.js', @@ -239,7 +239,6 @@ const mainConfig = { }, plugins: [ - ...baseConfig.plugins, // manifest filename must match config.webpack.manifest_filename // webpack-rails only needs assetsByChunkName to function properly new StatsWriterPlugin({ @@ -272,7 +271,7 @@ const mainConfig = { }), new webpack.NormalModuleReplacementPlugin(/^ee_component\/(.*)\.vue/, function(resource) { - if (Object.keys(mainConfig.resolve.alias).indexOf('ee') >= 0) { + if (Object.keys(module.exports.resolve.alias).indexOf('ee') >= 0) { resource.request = resource.request.replace(/^ee_component/, 'ee'); } else { resource.request = path.join( @@ -282,6 +281,9 @@ const mainConfig = { } }), + // compression can require a lot of compute time and is disabled in CI + IS_PRODUCTION && !NO_COMPRESSION && new CompressionPlugin(), + // WatchForChangesPlugin // TODO: publish this as a separate plugin IS_DEV_SERVER && { @@ -340,8 +342,8 @@ const mainConfig = { inline: DEV_SERVER_LIVERELOAD, }, + devtool: NO_SOURCEMAPS ? false : devtool, + // sqljs requires fs node: { fs: 'empty' }, }; - -module.exports = [mainConfig, visualReviewToolbarConfig]; |