summaryrefslogtreecommitdiff
path: root/config/webpack.config.review_toolbar.js
diff options
context:
space:
mode:
authorshampton <shampton@gitlab.com>2019-08-23 12:57:21 -0700
committershampton <shampton@gitlab.com>2019-08-23 12:57:21 -0700
commitc96adfcd6c9d303f3f7f86e441e57cb3ce8a286e (patch)
tree4251679d2f0abaf244984d55a1ad45e2cbc934b4 /config/webpack.config.review_toolbar.js
parent8f797950e8e5f92da800d67444a1f67bb6078f21 (diff)
downloadgitlab-ce-c96adfcd6c9d303f3f7f86e441e57cb3ce8a286e.tar.gz
Move visual review toolbar to NPM
Remove the visual review toolbar code in favor of using the NPM package.
Diffstat (limited to 'config/webpack.config.review_toolbar.js')
-rw-r--r--config/webpack.config.review_toolbar.js58
1 files changed, 0 insertions, 58 deletions
diff --git a/config/webpack.config.review_toolbar.js b/config/webpack.config.review_toolbar.js
deleted file mode 100644
index baaba7ed387..00000000000
--- a/config/webpack.config.review_toolbar.js
+++ /dev/null
@@ -1,58 +0,0 @@
-const path = require('path');
-const CompressionPlugin = require('compression-webpack-plugin');
-
-const ROOT_PATH = path.resolve(__dirname, '..');
-const CACHE_PATH = process.env.WEBPACK_CACHE_PATH || path.join(ROOT_PATH, 'tmp/cache');
-const NO_SOURCEMAPS = process.env.NO_SOURCEMAPS;
-const IS_PRODUCTION = process.env.NODE_ENV === 'production';
-
-const devtool = IS_PRODUCTION ? 'source-map' : 'cheap-module-eval-source-map';
-
-const alias = {
- vendor: path.join(ROOT_PATH, 'vendor/assets/javascripts'),
- spec: path.join(ROOT_PATH, 'spec/javascripts'),
-};
-
-module.exports = {
- mode: IS_PRODUCTION ? 'production' : 'development',
-
- context: path.join(ROOT_PATH, 'app/assets/javascripts'),
-
- name: 'visual_review_toolbar',
-
- entry: './visual_review_toolbar',
-
- output: {
- path: path.join(ROOT_PATH, 'public/assets/webpack'),
- filename: 'visual_review_toolbar.js',
- library: 'VisualReviewToolbar',
- libraryTarget: 'var',
- },
-
- resolve: {
- alias,
- },
-
- module: {
- rules: [
- {
- test: /\.js$/,
- loader: 'babel-loader',
- options: {
- cacheDirectory: path.join(CACHE_PATH, 'babel-loader'),
- },
- },
- {
- test: /\.css$/,
- use: ['style-loader', 'css-loader'],
- },
- ],
- },
-
- plugins: [
- // compression can require a lot of compute time and is disabled in CI
- new CompressionPlugin(),
- ].filter(Boolean),
-
- devtool: NO_SOURCEMAPS ? false : devtool,
-};