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>2020-06-18 14:18:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 14:18:50 +0300
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /config/webpack.config.js
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r--config/webpack.config.js23
1 files changed, 15 insertions, 8 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 7c130b010b6..557db58b1b9 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -19,10 +19,11 @@ const IS_EE = require('./helpers/is_ee_env');
const DEV_SERVER_HOST = process.env.DEV_SERVER_HOST || 'localhost';
const DEV_SERVER_PORT = parseInt(process.env.DEV_SERVER_PORT, 10) || 3808;
const DEV_SERVER_LIVERELOAD = IS_DEV_SERVER && process.env.DEV_SERVER_LIVERELOAD !== 'false';
-const WEBPACK_REPORT = process.env.WEBPACK_REPORT;
-const WEBPACK_MEMORY_TEST = process.env.WEBPACK_MEMORY_TEST;
-const NO_COMPRESSION = process.env.NO_COMPRESSION;
-const NO_SOURCEMAPS = process.env.NO_SOURCEMAPS;
+const WEBPACK_REPORT = process.env.WEBPACK_REPORT && process.env.WEBPACK_REPORT !== 'false';
+const WEBPACK_MEMORY_TEST =
+ process.env.WEBPACK_MEMORY_TEST && process.env.WEBPACK_MEMORY_TEST !== 'false';
+const NO_COMPRESSION = process.env.NO_COMPRESSION && process.env.NO_COMPRESSION !== 'false';
+const NO_SOURCEMAPS = process.env.NO_SOURCEMAPS && process.env.NO_SOURCEMAPS !== 'false';
const VUE_VERSION = require('vue/package.json').version;
const VUE_LOADER_VERSION = require('vue-loader/package.json').version;
@@ -244,6 +245,7 @@ module.exports = {
loader: 'file-loader',
options: {
name: '[name].[contenthash:8].[ext]',
+ esModule: false,
},
},
],
@@ -254,7 +256,7 @@ module.exports = {
moduleIds: 'hashed',
runtimeChunk: 'single',
splitChunks: {
- maxInitialRequests: 4,
+ maxInitialRequests: 20,
cacheGroups: {
default: false,
common: () => ({
@@ -329,9 +331,6 @@ module.exports = {
// automatically configure monaco editor web workers
new MonacoWebpackPlugin(),
- // prevent pikaday from including moment.js
- new webpack.IgnorePlugin(/moment/, /pikaday/),
-
// fix legacy jQuery plugins which depend on globals
new webpack.ProvidePlugin({
$: 'jquery',
@@ -516,6 +515,14 @@ module.exports = {
// This one is used to check against "EE" properly in application code
IS_EE: IS_EE ? 'window.gon && window.gon.ee' : JSON.stringify(false),
}),
+
+ /* Pikaday has a optional dependency to moment.
+ We are currently not utilizing moment.
+ Ignoring this import removes warning from our development build.
+ Upstream reference:
+ https://github.com/Pikaday/Pikaday/blob/5c1a7559be/pikaday.js#L14
+ */
+ new webpack.IgnorePlugin(/moment/, /pikaday/),
].filter(Boolean),
devServer: {