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
path: root/config
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-03-02 01:01:33 +0300
committerMike Greiling <mike@pixelcog.com>2017-03-04 01:47:38 +0300
commitcb6c036d8942ab24048b9ecebcc6c3fa408c9a3e (patch)
tree148d8eaf97ed02498cb348baa8f844d4bbc5ee65 /config
parente80fa69895dadfbd5cdc95f7feb9593cfe52e9b6 (diff)
create a common.js bundle and include all jQuery plugins
Diffstat (limited to 'config')
-rw-r--r--config/webpack.config.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index cbf59276dce..c2e0e86fb78 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -17,6 +17,7 @@ var WEBPACK_REPORT = process.env.WEBPACK_REPORT;
var config = {
context: path.join(ROOT_PATH, 'app/assets/javascripts'),
entry: {
+ common: './commons/index.js',
application: './application.js',
blob_edit: './blob_edit/blob_edit_bundle.js',
boards: './boards/boards_bundle.js',
@@ -90,13 +91,18 @@ var config = {
IS_PRODUCTION ?
new webpack.HashedModuleIdsPlugin() :
new webpack.NamedModulesPlugin(),
+
+ // create a common.js bundle to be loaded on every page
+ new webpack.optimize.CommonsChunkPlugin({
+ name: 'common',
+ minChunks: Infinity,
+ }),
],
resolve: {
extensions: ['.js', '.es6', '.js.es6'],
alias: {
'~': path.join(ROOT_PATH, 'app/assets/javascripts'),
- 'bootstrap/js': 'bootstrap-sass/assets/javascripts/bootstrap',
'emoji-aliases$': path.join(ROOT_PATH, 'fixtures/emojis/aliases.json'),
'icons': path.join(ROOT_PATH, 'app/views/shared/icons'),
'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'),