diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-23 03:09:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-23 03:09:47 +0300 |
commit | 814fd46dfdf3493c06007653774327ddb2f02938 (patch) | |
tree | 07b68a4e8eb986e03c5cabd0a6266be881011aa8 /config/webpack.config.js | |
parent | d6d1051383d42211e5f4d2752d60f946f21df1b7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r-- | config/webpack.config.js | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index 11694e4aa1f..6880c67dff5 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -451,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) => { @@ -467,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(), |