Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /config/webpack.config.js
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r--config/webpack.config.js76
1 files changed, 35 insertions, 41 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 94aa190b77a..db5371a7258 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -1,11 +1,11 @@
const fs = require('fs');
+const path = require('path');
const SOURCEGRAPH_VERSION = require('@sourcegraph/code-host-integration/package.json').version;
const CompressionPlugin = require('compression-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const glob = require('glob');
-const path = require('path');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const VUE_LOADER_VERSION = require('vue-loader/package.json').version;
const VUE_VERSION = require('vue/package.json').version;
@@ -188,7 +188,7 @@ module.exports = {
},
resolve: {
- extensions: ['.js', '.gql', '.graphql'],
+ extensions: ['.js'],
alias,
},
@@ -307,11 +307,11 @@ module.exports = {
chunks: 'initial',
minChunks: autoEntriesCount * 0.9,
}),
- tiptap: {
+ prosemirror: {
priority: 17,
- name: 'tiptap',
+ name: 'prosemirror',
chunks: 'all',
- test: /[\\/]node_modules[\\/](tiptap|prosemirror)-?\w*[\\/]/,
+ test: /[\\/]node_modules[\\/]prosemirror.*?[\\/]/,
minChunks: 2,
reuseExistingChunk: true,
},
@@ -395,18 +395,6 @@ module.exports = {
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
- Popper: ['popper.js', 'default'],
- Alert: 'exports-loader?Alert!bootstrap/js/dist/alert',
- Button: 'exports-loader?Button!bootstrap/js/dist/button',
- Carousel: 'exports-loader?Carousel!bootstrap/js/dist/carousel',
- Collapse: 'exports-loader?Collapse!bootstrap/js/dist/collapse',
- Dropdown: 'exports-loader?Dropdown!bootstrap/js/dist/dropdown',
- Modal: 'exports-loader?Modal!bootstrap/js/dist/modal',
- Popover: 'exports-loader?Popover!bootstrap/js/dist/popover',
- Scrollspy: 'exports-loader?Scrollspy!bootstrap/js/dist/scrollspy',
- Tab: 'exports-loader?Tab!bootstrap/js/dist/tab',
- Tooltip: 'exports-loader?Tooltip!bootstrap/js/dist/tooltip',
- Util: 'exports-loader?Util!bootstrap/js/dist/util',
}),
// if DLLs are enabled, detect whether the DLL exists and create it automatically if necessary
@@ -463,12 +451,14 @@ module.exports = {
}),
dll &&
- new CopyWebpackPlugin([
- {
- from: dll.cacheFrom,
- to: dll.cacheTo,
- },
- ]),
+ new CopyWebpackPlugin({
+ patterns: [
+ {
+ from: dll.cacheFrom,
+ to: dll.cacheTo,
+ },
+ ],
+ }),
!IS_EE &&
new webpack.NormalModuleReplacementPlugin(/^ee_component\/(.*)\.vue/, (resource) => {
@@ -479,24 +469,28 @@ module.exports = {
);
}),
- new CopyWebpackPlugin([
- {
- from: path.join(ROOT_PATH, 'node_modules/pdfjs-dist/cmaps/'),
- to: path.join(WEBPACK_OUTPUT_PATH, 'cmaps/'),
- },
- {
- from: path.join(ROOT_PATH, 'node_modules', SOURCEGRAPH_PACKAGE, '/'),
- to: SOURCEGRAPH_OUTPUT_PATH,
- ignore: ['package.json'],
- },
- {
- from: path.join(
- ROOT_PATH,
- 'node_modules/@gitlab/visual-review-tools/dist/visual_review_toolbar.js',
- ),
- to: WEBPACK_OUTPUT_PATH,
- },
- ]),
+ new CopyWebpackPlugin({
+ patterns: [
+ {
+ from: path.join(ROOT_PATH, 'node_modules/pdfjs-dist/cmaps/'),
+ to: path.join(WEBPACK_OUTPUT_PATH, 'cmaps/'),
+ },
+ {
+ from: path.join(ROOT_PATH, 'node_modules', SOURCEGRAPH_PACKAGE, '/'),
+ to: SOURCEGRAPH_OUTPUT_PATH,
+ globOptions: {
+ ignore: ['package.json'],
+ },
+ },
+ {
+ from: path.join(
+ ROOT_PATH,
+ 'node_modules/@gitlab/visual-review-tools/dist/visual_review_toolbar.js',
+ ),
+ to: WEBPACK_OUTPUT_PATH,
+ },
+ ],
+ }),
// compression can require a lot of compute time and is disabled in CI
IS_PRODUCTION && !NO_COMPRESSION && new CompressionPlugin(),