diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-03-01 20:28:34 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-03-03 16:47:38 -0600 |
commit | 7f22c39a25b5424ab1fd7905654667a697c82aeb (patch) | |
tree | d4510eead10f0039c638ef10629cb7e87e696f17 /config/webpack.config.js | |
parent | 14517f977a55fbe0a2371ebb7d33df7c35415e8d (diff) | |
download | gitlab-ce-7f22c39a25b5424ab1fd7905654667a697c82aeb.tar.gz |
create a cacheable commons bundle for our Vue bundles
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r-- | config/webpack.config.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index f262286f5f8..cdae80550dc 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -18,6 +18,7 @@ var config = { context: path.join(ROOT_PATH, 'app/assets/javascripts'), entry: { common: './commons/index.js', + common_vue: ['vue', 'vue-resource'], application: './application.js', blob_edit: './blob_edit/blob_edit_bundle.js', boards: './boards/boards_bundle.js', @@ -41,7 +42,6 @@ var config = { users: './users/users_bundle.js', lib_chart: './lib/chart.js', lib_d3: './lib/d3.js', - lib_vue: './lib/vue_resource.js', vue_pipelines: './vue_pipelines_index/index.js', }, @@ -98,6 +98,23 @@ var config = { new webpack.HashedModuleIdsPlugin() : new webpack.NamedModulesPlugin(), + // create cacheable common library bundle for all vue chunks + new webpack.optimize.CommonsChunkPlugin({ + name: 'common_vue', + chunks: [ + 'boards', + 'commit_pipelines', + 'cycle_analytics', + 'diff_notes', + 'environments', + 'environments_folder', + 'issuable', + 'merge_conflicts', + 'vue_pipelines', + ], + minChunks: Infinity, + }), + // create cacheable common library bundles new webpack.optimize.CommonsChunkPlugin({ names: ['application', 'common', 'manifest'], |