diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2018-02-28 20:55:11 +0300 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2018-02-28 20:55:11 +0300 |
commit | 9cb3ababe752b5b27c097721cd35aa23dd11bcaa (patch) | |
tree | d12e1b0147a7fe986feedfb270399320f4415473 /config/webpack.config.js | |
parent | 54432de3b6574fd63da0723a2f2fc47b8e4037cc (diff) | |
parent | ccbce7af7e0e532ae5d19ea2af7aaff8933490a9 (diff) |
Merge branch 'master' into 'dispatcher-cleanup'
# Conflicts:
# config/webpack.config.js
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r-- | config/webpack.config.js | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index 65785385554..d8ba3c06d3a 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -44,7 +44,6 @@ function generateEntries() { const manualEntries = { balsamiq_viewer: './blob/balsamiq_viewer.js', - cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js', environments: './environments/environments_bundle.js', monitoring: './monitoring/monitoring_bundle.js', mr_notes: './mr_notes/index.js', @@ -59,7 +58,6 @@ function generateEntries() { terminal: './terminal/terminal_bundle.js', two_factor_auth: './two_factor_auth.js', - common: './commons/index.js', common_vue: './vue_shared/vue_resource_interceptor.js', locale: './locale/index.js', @@ -225,6 +223,33 @@ const config = { return `${moduleNames[0]}-${hash.substr(0, 6)}`; }), + // create cacheable common library bundle for all vue chunks + new webpack.optimize.CommonsChunkPlugin({ + name: 'common_vue', + chunks: [ + 'boards', + 'deploy_keys', + 'environments', + 'filtered_search', + 'groups', + 'monitoring', + 'mr_notes', + 'notebook_viewer', + 'pdf_viewer', + 'pipelines', + 'pipelines_details', + 'registry_list', + 'ide', + 'schedule_form', + 'schedules_index', + 'sidebar', + 'vue_merge_request_widget', + ], + minChunks: function(module, count) { + return module.resource && (/vue_shared/).test(module.resource); + }, + }), + // create cacheable common library bundles new webpack.optimize.CommonsChunkPlugin({ names: ['main', 'common', 'webpack_runtime'], |