From fffc1317959940bd12f6fec6fb9f095dfc48c994 Mon Sep 17 00:00:00 2001 From: Constance Okoghenun Date: Fri, 23 Feb 2018 17:18:24 +0100 Subject: removed profile webpack bundle tag --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 94ff39485fb..ad0c8ee51c5 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -73,7 +73,6 @@ var config = { pdf_viewer: './blob/pdf_viewer.js', pipelines: './pipelines/pipelines_bundle.js', pipelines_details: './pipelines/pipeline_details_bundle.js', - profile: './profile/profile_bundle.js', project_import_gl: './projects/project_import_gitlab_project.js', protected_branches: './protected_branches', protected_tags: './protected_tags', -- cgit v1.2.1 From fd598fd6bda91343d7e271c0fe485ead9e0011d2 Mon Sep 17 00:00:00 2001 From: Constance Okoghenun Date: Fri, 23 Feb 2018 21:23:27 +0100 Subject: Removed protected_tags webpack bundle --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 9db6ecd27af..7f3b279b062 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -71,7 +71,6 @@ var config = { profile: './profile/profile_bundle.js', project_import_gl: './projects/project_import_gitlab_project.js', protected_branches: './protected_branches', - protected_tags: './protected_tags', registry_list: './registry/index.js', sidebar: './sidebar/sidebar_bundle.js', snippet: './snippet/snippet_bundle.js', -- cgit v1.2.1 From 17b3f5316d19d1f81088570136116e1102fc1d3e Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Fri, 16 Feb 2018 10:56:04 -0500 Subject: Fix conflicts --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 0e96a2f6941..1cdd1d83baf 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -66,7 +66,6 @@ var config = { notebook_viewer: './blob/notebook_viewer.js', pdf_viewer: './blob/pdf_viewer.js', pipelines: './pipelines/pipelines_bundle.js', - pipelines_details: './pipelines/pipeline_details_bundle.js', profile: './profile/profile_bundle.js', project_import_gl: './projects/project_import_gitlab_project.js', protected_branches: './protected_branches', -- cgit v1.2.1 From 873595337ec9f9c25dd455ebcbd0bd4876bc062e Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Fri, 23 Feb 2018 16:57:09 -0600 Subject: Remove sidebar bundle webpack entry point --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 0e96a2f6941..75ae657852b 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -72,7 +72,6 @@ var config = { protected_branches: './protected_branches', protected_tags: './protected_tags', registry_list: './registry/index.js', - sidebar: './sidebar/sidebar_bundle.js', snippet: './snippet/snippet_bundle.js', sketch_viewer: './blob/sketch_viewer.js', stl_viewer: './blob/stl_viewer.js', -- cgit v1.2.1 From 6358004b1c64ed3f8b83a75a672a0a72e1bee851 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Mon, 26 Feb 2018 16:05:24 +0000 Subject: Converted webpack_bundle_tag to be automatic webpack bundles --- config/webpack.config.js | 3 --- 1 file changed, 3 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index be827903a6a..6383ac9d5e3 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -63,10 +63,8 @@ var config = { help: './help/help.js', merge_conflicts: './merge_conflicts/merge_conflicts_bundle.js', monitoring: './monitoring/monitoring_bundle.js', - network: './network/network_bundle.js', notebook_viewer: './blob/notebook_viewer.js', pdf_viewer: './blob/pdf_viewer.js', - pipelines: './pipelines/pipelines_bundle.js', pipelines_details: './pipelines/pipeline_details_bundle.js', profile: './profile/profile_bundle.js', project_import_gl: './projects/project_import_gitlab_project.js', @@ -79,7 +77,6 @@ var config = { stl_viewer: './blob/stl_viewer.js', terminal: './terminal/terminal_bundle.js', ui_development_kit: './ui_development_kit.js', - vue_merge_request_widget: './vue_merge_request_widget/index.js', two_factor_auth: './two_factor_auth.js', -- cgit v1.2.1 From a06152540794d247a34826313e7ab466bf5ee8bb Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Mon, 26 Feb 2018 17:27:42 +0000 Subject: Remove webpack bundle tags for blob --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index be827903a6a..05389a2a93f 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -51,7 +51,6 @@ var config = { context: path.join(ROOT_PATH, 'app/assets/javascripts'), entry: { balsamiq_viewer: './blob/balsamiq_viewer.js', - blob: './blob_edit/blob_bundle.js', common: './commons/index.js', common_vue: './vue_shared/vue_resource_interceptor.js', cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js', -- cgit v1.2.1 From d434c62a83f5fe02f6eff3b9e311cba2eab38bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 26 Feb 2018 19:43:34 +0000 Subject: Move EE-specific JavaScript files to ee/app/assets/javascripts --- config/webpack.config.js | 1 + 1 file changed, 1 insertion(+) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 05389a2a93f..665dbe012dc 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -309,6 +309,7 @@ var config = { 'images': path.join(ROOT_PATH, 'app/assets/images'), 'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'), 'vue$': 'vue/dist/vue.esm.js', + 'spec': path.join(ROOT_PATH, 'spec/javascripts'), } } } -- cgit v1.2.1 From 7729a0ecc025c1ab8e6f0c8b5770fba8d254d831 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Mon, 26 Feb 2018 20:01:05 +0000 Subject: Refactor wildcard dispatcher imports --- config/webpack.config.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 665dbe012dc..2b0c86c5e39 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -25,16 +25,10 @@ var NO_COMPRESSION = process.env.NO_COMPRESSION; var autoEntries = {}; var pageEntries = glob.sync('pages/**/index.js', { cwd: path.join(ROOT_PATH, 'app/assets/javascripts') }); -// filter out entries currently imported dynamically in dispatcher.js -var dispatcher = fs.readFileSync(path.join(ROOT_PATH, 'app/assets/javascripts/dispatcher.js')).toString(); -var dispatcherChunks = dispatcher.match(/(?!import\(')\.\/pages\/[^']+/g); - function generateAutoEntries(path, prefix = '.') { const chunkPath = path.replace(/\/index\.js$/, ''); - if (!dispatcherChunks.includes(`${prefix}/${chunkPath}`)) { - const chunkName = chunkPath.replace(/\//g, '.'); - autoEntries[chunkName] = `${prefix}/${path}`; - } + const chunkName = chunkPath.replace(/\//g, '.'); + autoEntries[chunkName] = `${prefix}/${path}`; } pageEntries.forEach(( path ) => generateAutoEntries(path)); -- cgit v1.2.1 From 4ebfa4b0ad34ea8766cfcbb1ac092e2b9348d773 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Mon, 26 Feb 2018 15:24:29 -0600 Subject: Remove commit_pipelines webpack entry point --- config/webpack.config.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 05389a2a93f..732a89fb0a5 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -54,7 +54,6 @@ var config = { common: './commons/index.js', common_vue: './vue_shared/vue_resource_interceptor.js', cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js', - commit_pipelines: './commit/pipelines/pipelines_bundle.js', diff_notes: './diff_notes/diff_notes_bundle.js', environments: './environments/environments_bundle.js', environments_folder: './environments/folder/environments_folder_bundle.js', @@ -244,7 +243,6 @@ var config = { name: 'common_vue', chunks: [ 'boards', - 'commit_pipelines', 'cycle_analytics', 'deploy_keys', 'diff_notes', -- cgit v1.2.1 From f3d06efcfd89c4d9bd80992df9e9b31958304999 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Mon, 26 Feb 2018 15:44:03 -0600 Subject: Remove environments folder webpack entry point --- config/webpack.config.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 05389a2a93f..a5d14272411 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -57,7 +57,6 @@ var config = { commit_pipelines: './commit/pipelines/pipelines_bundle.js', diff_notes: './diff_notes/diff_notes_bundle.js', environments: './environments/environments_bundle.js', - environments_folder: './environments/folder/environments_folder_bundle.js', filtered_search: './filtered_search/filtered_search_bundle.js', help: './help/help.js', merge_conflicts: './merge_conflicts/merge_conflicts_bundle.js', @@ -249,7 +248,6 @@ var config = { 'deploy_keys', 'diff_notes', 'environments', - 'environments_folder', 'filtered_search', 'groups', 'merge_conflicts', -- cgit v1.2.1 From 2400c7bf4c3f69c46ce9c40b3c5c547b2e590dc5 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Mon, 26 Feb 2018 16:00:52 -0600 Subject: Remove diff notes webpack entry point --- config/webpack.config.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 05389a2a93f..d0b17154978 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -55,7 +55,6 @@ var config = { common_vue: './vue_shared/vue_resource_interceptor.js', cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js', commit_pipelines: './commit/pipelines/pipelines_bundle.js', - diff_notes: './diff_notes/diff_notes_bundle.js', environments: './environments/environments_bundle.js', environments_folder: './environments/folder/environments_folder_bundle.js', filtered_search: './filtered_search/filtered_search_bundle.js', @@ -247,7 +246,6 @@ var config = { 'commit_pipelines', 'cycle_analytics', 'deploy_keys', - 'diff_notes', 'environments', 'environments_folder', 'filtered_search', -- cgit v1.2.1 From c3564cd79ebabc7b2fd33dd43c9732e724e2e669 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Tue, 27 Feb 2018 17:06:35 +0000 Subject: Prevent webpack from rebooting while switching branches --- config/webpack.config.js | 77 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 25 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 2cc89f325e5..5e70995c4ab 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -21,29 +21,28 @@ var DEV_SERVER_LIVERELOAD = process.env.DEV_SERVER_LIVERELOAD !== 'false'; var WEBPACK_REPORT = process.env.WEBPACK_REPORT; var NO_COMPRESSION = process.env.NO_COMPRESSION; -// generate automatic entry points -var autoEntries = {}; -var pageEntries = glob.sync('pages/**/index.js', { cwd: path.join(ROOT_PATH, 'app/assets/javascripts') }); - -function generateAutoEntries(path, prefix = '.') { - const chunkPath = path.replace(/\/index\.js$/, ''); - const chunkName = chunkPath.replace(/\//g, '.'); - autoEntries[chunkName] = `${prefix}/${path}`; -} +var autoEntriesCount = 0; +var watchAutoEntries = []; + +function generateEntries() { + // generate automatic entry points + var autoEntries = {}; + var pageEntries = glob.sync('pages/**/index.js', { cwd: path.join(ROOT_PATH, 'app/assets/javascripts') }); + watchAutoEntries = [ + path.join(ROOT_PATH, 'app/assets/javascripts/pages/'), + ]; + + function generateAutoEntries(path, prefix = '.') { + const chunkPath = path.replace(/\/index\.js$/, ''); + const chunkName = chunkPath.replace(/\//g, '.'); + autoEntries[chunkName] = `${prefix}/${path}`; + } -pageEntries.forEach(( path ) => generateAutoEntries(path)); + pageEntries.forEach(( path ) => generateAutoEntries(path)); -// report our auto-generated bundle count -var autoEntriesCount = Object.keys(autoEntries).length; -console.log(`${autoEntriesCount} entries from '/pages' automatically added to webpack output.`); + autoEntriesCount = Object.keys(autoEntries).length; -var config = { - // because sqljs requires fs. - node: { - fs: "empty" - }, - context: path.join(ROOT_PATH, 'app/assets/javascripts'), - entry: { + const manualEntries = { balsamiq_viewer: './blob/balsamiq_viewer.js', common: './commons/index.js', common_vue: './vue_shared/vue_resource_interceptor.js', @@ -79,7 +78,15 @@ var config = { test: './test.js', u2f: ['vendor/u2f'], webpack_runtime: './webpack.js', - }, + }; + + return Object.assign(manualEntries, autoEntries); +} + +var config = { + context: path.join(ROOT_PATH, 'app/assets/javascripts'), + + entry: generateEntries, output: { path: path.join(ROOT_PATH, 'public/assets/webpack'), @@ -296,10 +303,13 @@ var config = { 'vue$': 'vue/dist/vue.esm.js', 'spec': path.join(ROOT_PATH, 'spec/javascripts'), } - } -} + }, -config.entry = Object.assign({}, autoEntries, config.entry); + // sqljs requires fs + node: { + fs: 'empty', + }, +}; if (IS_PRODUCTION) { config.devtool = 'source-map'; @@ -336,7 +346,24 @@ if (IS_DEV_SERVER) { }; config.plugins.push( // watch node_modules for changes if we encounter a missing module compile error - new WatchMissingNodeModulesPlugin(path.join(ROOT_PATH, 'node_modules')) + new WatchMissingNodeModulesPlugin(path.join(ROOT_PATH, 'node_modules')), + + // watch for changes to our automatic entry point modules + { + apply(compiler) { + compiler.plugin('emit', (compilation, callback) => { + compilation.contextDependencies = [ + ...compilation.contextDependencies, + ...watchAutoEntries, + ]; + + // report our auto-generated bundle count + console.log(`${autoEntriesCount} entries from '/pages' automatically added to webpack output.`); + + callback(); + }) + }, + }, ); if (DEV_SERVER_LIVERELOAD) { config.plugins.push(new webpack.HotModuleReplacementPlugin()); -- cgit v1.2.1 From 16b6c0e2b178ce3abca2f9fb381d2981f6b37174 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 27 Feb 2018 14:06:00 -0600 Subject: Remove trailing comma in webpack config to support Node@<8 See https://gitlab.com/gitlab-org/gitlab-ce/issues/43669 --- config/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index cdeca3ecfd5..137bf729aab 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -362,7 +362,7 @@ if (IS_DEV_SERVER) { callback(); }) }, - }, + } ); if (DEV_SERVER_LIVERELOAD) { config.plugins.push(new webpack.HotModuleReplacementPlugin()); -- cgit v1.2.1 From 254c43fbb1a614b772599ac5acd7dc5d1eca6d7b Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Tue, 27 Feb 2018 21:47:34 +0000 Subject: Remove snippet bundle webpack entry point --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index ac5ab6dd4c3..93f900e18a4 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -59,7 +59,6 @@ function generateEntries() { protected_branches: './protected_branches', protected_tags: './protected_tags', registry_list: './registry/index.js', - snippet: './snippet/snippet_bundle.js', sketch_viewer: './blob/sketch_viewer.js', stl_viewer: './blob/stl_viewer.js', terminal: './terminal/terminal_bundle.js', -- cgit v1.2.1 From 94d5dd3b7bf5fb922458cec7659754164e8182c6 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Tue, 27 Feb 2018 16:51:12 -0600 Subject: remove merge_conflicts bundle in favor of pages directory entry point --- config/webpack.config.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 613ed1cad03..20d398c41ea 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -50,7 +50,6 @@ function generateEntries() { environments: './environments/environments_bundle.js', filtered_search: './filtered_search/filtered_search_bundle.js', help: './help/help.js', - merge_conflicts: './merge_conflicts/merge_conflicts_bundle.js', monitoring: './monitoring/monitoring_bundle.js', notebook_viewer: './blob/notebook_viewer.js', pdf_viewer: './blob/pdf_viewer.js', @@ -241,7 +240,6 @@ var config = { 'environments', 'filtered_search', 'groups', - 'merge_conflicts', 'monitoring', 'notebook_viewer', 'pdf_viewer', -- cgit v1.2.1 From 7ec5d320f33d46d47a28c3ec7d755a6d42bbd08b Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Tue, 27 Feb 2018 16:56:39 -0600 Subject: remove duplicate common and common_vue definitions --- config/webpack.config.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 20d398c41ea..11fe6be64f2 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -44,8 +44,6 @@ function generateEntries() { const manualEntries = { balsamiq_viewer: './blob/balsamiq_viewer.js', - common: './commons/index.js', - common_vue: './vue_shared/vue_resource_interceptor.js', cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js', environments: './environments/environments_bundle.js', filtered_search: './filtered_search/filtered_search_bundle.js', -- cgit v1.2.1 From 059ab73b8eae3a546d0a19fe99ef0c52df5fac01 Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Wed, 28 Feb 2018 00:10:43 +0000 Subject: Render MR Notes with Vue with behind a cookie --- config/webpack.config.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 613ed1cad03..f9c10ff5986 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -52,6 +52,7 @@ function generateEntries() { help: './help/help.js', merge_conflicts: './merge_conflicts/merge_conflicts_bundle.js', monitoring: './monitoring/monitoring_bundle.js', + mr_notes: './mr_notes/index.js', notebook_viewer: './blob/notebook_viewer.js', pdf_viewer: './blob/pdf_viewer.js', pipelines_details: './pipelines/pipeline_details_bundle.js', @@ -243,6 +244,7 @@ var config = { 'groups', 'merge_conflicts', 'monitoring', + 'mr_notes', 'notebook_viewer', 'pdf_viewer', 'pipelines', -- cgit v1.2.1 From 182ed522152f2679fb035a331ec4ff92b0075d1a Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 28 Feb 2018 00:56:16 -0600 Subject: remove unused help webpack bundle --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index b01cfd6595e..1f7387dece5 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -47,7 +47,6 @@ function generateEntries() { cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js', environments: './environments/environments_bundle.js', filtered_search: './filtered_search/filtered_search_bundle.js', - help: './help/help.js', monitoring: './monitoring/monitoring_bundle.js', mr_notes: './mr_notes/index.js', notebook_viewer: './blob/notebook_viewer.js', -- cgit v1.2.1 From 77926bc29db638f50cf322f91913f5a68228b1ea Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 28 Feb 2018 00:57:52 -0600 Subject: remove unused project_import_gl webpack bundle --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 1f7387dece5..7e2a2d7e3b4 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -52,7 +52,6 @@ function generateEntries() { notebook_viewer: './blob/notebook_viewer.js', pdf_viewer: './blob/pdf_viewer.js', pipelines_details: './pipelines/pipeline_details_bundle.js', - project_import_gl: './projects/project_import_gitlab_project.js', protected_branches: './protected_branches', protected_tags: './protected_tags', registry_list: './registry/index.js', -- cgit v1.2.1 From 7ed005a561351fa61c2572ffbb070741b826b8bd Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 28 Feb 2018 01:02:04 -0600 Subject: remove unused filtered_search webpack bundle --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 7e2a2d7e3b4..8321206e2cf 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -46,7 +46,6 @@ function generateEntries() { balsamiq_viewer: './blob/balsamiq_viewer.js', cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js', environments: './environments/environments_bundle.js', - filtered_search: './filtered_search/filtered_search_bundle.js', monitoring: './monitoring/monitoring_bundle.js', mr_notes: './mr_notes/index.js', notebook_viewer: './blob/notebook_viewer.js', -- cgit v1.2.1 From 97112250e1062746611d524a0799743d4cb13470 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 28 Feb 2018 01:03:42 -0600 Subject: remove unused ui_development_kit webpack bundle --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 8321206e2cf..051bc7922e2 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -57,7 +57,6 @@ function generateEntries() { sketch_viewer: './blob/sketch_viewer.js', stl_viewer: './blob/stl_viewer.js', terminal: './terminal/terminal_bundle.js', - ui_development_kit: './ui_development_kit.js', two_factor_auth: './two_factor_auth.js', -- cgit v1.2.1 From 6e49a757878ce24f9ef8c51f1f0c4f3e36a48081 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 28 Feb 2018 01:08:18 -0600 Subject: remove common_vue from CommonsChunkPlugin --- config/webpack.config.js | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 051bc7922e2..ceba31ae0c8 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -225,34 +225,6 @@ var 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', - 'cycle_analytics', - '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'], -- cgit v1.2.1 From 5a3511ea78eb50176f4a5c4576ef7955663611c1 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 28 Feb 2018 01:19:10 -0600 Subject: prefer let and const in webpack config --- config/webpack.config.js | 54 ++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index ceba31ae0c8..65785385554 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -1,33 +1,33 @@ 'use strict'; -var crypto = require('crypto'); -var fs = require('fs'); -var path = require('path'); -var glob = require('glob'); -var webpack = require('webpack'); -var StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin; -var CopyWebpackPlugin = require('copy-webpack-plugin'); -var CompressionPlugin = require('compression-webpack-plugin'); -var NameAllModulesPlugin = require('name-all-modules-plugin'); -var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; -var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); - -var ROOT_PATH = path.resolve(__dirname, '..'); -var IS_PRODUCTION = process.env.NODE_ENV === 'production'; -var IS_DEV_SERVER = process.argv.join(' ').indexOf('webpack-dev-server') !== -1; -var DEV_SERVER_HOST = process.env.DEV_SERVER_HOST || 'localhost'; -var DEV_SERVER_PORT = parseInt(process.env.DEV_SERVER_PORT, 10) || 3808; -var DEV_SERVER_LIVERELOAD = process.env.DEV_SERVER_LIVERELOAD !== 'false'; -var WEBPACK_REPORT = process.env.WEBPACK_REPORT; -var NO_COMPRESSION = process.env.NO_COMPRESSION; - -var autoEntriesCount = 0; -var watchAutoEntries = []; +const crypto = require('crypto'); +const fs = require('fs'); +const path = require('path'); +const glob = require('glob'); +const webpack = require('webpack'); +const StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin; +const CopyWebpackPlugin = require('copy-webpack-plugin'); +const CompressionPlugin = require('compression-webpack-plugin'); +const NameAllModulesPlugin = require('name-all-modules-plugin'); +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; +const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); + +const ROOT_PATH = path.resolve(__dirname, '..'); +const IS_PRODUCTION = process.env.NODE_ENV === 'production'; +const IS_DEV_SERVER = process.argv.join(' ').indexOf('webpack-dev-server') !== -1; +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 = process.env.DEV_SERVER_LIVERELOAD !== 'false'; +const WEBPACK_REPORT = process.env.WEBPACK_REPORT; +const NO_COMPRESSION = process.env.NO_COMPRESSION; + +let autoEntriesCount = 0; +let watchAutoEntries = []; function generateEntries() { // generate automatic entry points - var autoEntries = {}; - var pageEntries = glob.sync('pages/**/index.js', { cwd: path.join(ROOT_PATH, 'app/assets/javascripts') }); + const autoEntries = {}; + const pageEntries = glob.sync('pages/**/index.js', { cwd: path.join(ROOT_PATH, 'app/assets/javascripts') }); watchAutoEntries = [ path.join(ROOT_PATH, 'app/assets/javascripts/pages/'), ]; @@ -74,7 +74,7 @@ function generateEntries() { return Object.assign(manualEntries, autoEntries); } -var config = { +const config = { context: path.join(ROOT_PATH, 'app/assets/javascripts'), entry: generateEntries, @@ -166,7 +166,7 @@ var config = { new StatsWriterPlugin({ filename: 'manifest.json', transform: function(data, opts) { - var stats = opts.compiler.getStats().toJson({ + const stats = opts.compiler.getStats().toJson({ chunkModules: false, source: false, chunks: false, -- cgit v1.2.1 From a9db24b2be09f15cabc84735d76f355940dc7a9e Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Wed, 28 Feb 2018 17:13:46 +0000 Subject: Remove cycle analytics bundle webpack entry point --- config/webpack.config.js | 3 --- 1 file changed, 3 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index b01cfd6595e..fb0a2c84ccc 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', filtered_search: './filtered_search/filtered_search_bundle.js', help: './help/help.js', @@ -63,7 +62,6 @@ function generateEntries() { ui_development_kit: './ui_development_kit.js', two_factor_auth: './two_factor_auth.js', - common: './commons/index.js', common_vue: './vue_shared/vue_resource_interceptor.js', locale: './locale/index.js', @@ -234,7 +232,6 @@ var config = { name: 'common_vue', chunks: [ 'boards', - 'cycle_analytics', 'deploy_keys', 'environments', 'filtered_search', -- cgit v1.2.1 From aae4d8b014dc16fe1807b74957e6e586d67f0baf Mon Sep 17 00:00:00 2001 From: Constance Okoghenun Date: Wed, 28 Feb 2018 20:26:12 +0000 Subject: Remove webpack bundle tag for enviroments --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index d8ba3c06d3a..0d2b5dd3fa7 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', - environments: './environments/environments_bundle.js', monitoring: './monitoring/monitoring_bundle.js', mr_notes: './mr_notes/index.js', notebook_viewer: './blob/notebook_viewer.js', -- cgit v1.2.1 From e951fa9da0fe2bc765fb4089b5678eaf4ca72d01 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Thu, 1 Mar 2018 16:57:55 +0000 Subject: Remove unnecessary chunks from common_vue --- config/webpack.config.js | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index e806083bf16..4611544226d 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -224,23 +224,12 @@ const config = { 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); -- cgit v1.2.1 From 2d8966f7f521c3d5eae47ff5f1cbc13d37cfc185 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Thu, 1 Mar 2018 01:33:06 -0600 Subject: migrate balsamiq_viewer to dynamic import --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 4611544226d..2e72e0c335b 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -43,7 +43,6 @@ function generateEntries() { autoEntriesCount = Object.keys(autoEntries).length; const manualEntries = { - balsamiq_viewer: './blob/balsamiq_viewer.js', monitoring: './monitoring/monitoring_bundle.js', mr_notes: './mr_notes/index.js', notebook_viewer: './blob/notebook_viewer.js', -- cgit v1.2.1 From e2c87838157d90062725fd648788c6e1839bc8d8 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Thu, 1 Mar 2018 01:47:06 -0600 Subject: migrate notebook_viewer to dynamic import --- config/webpack.config.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 2e72e0c335b..20d95ff22a1 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -45,7 +45,6 @@ function generateEntries() { const manualEntries = { monitoring: './monitoring/monitoring_bundle.js', mr_notes: './mr_notes/index.js', - notebook_viewer: './blob/notebook_viewer.js', pdf_viewer: './blob/pdf_viewer.js', protected_branches: './protected_branches', registry_list: './registry/index.js', @@ -225,7 +224,6 @@ const config = { chunks: [ 'monitoring', 'mr_notes', - 'notebook_viewer', 'pdf_viewer', 'registry_list', 'ide', -- cgit v1.2.1 From 4e86a7378cd96ffebfb1c128c9fcb614ee479ffe Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Thu, 1 Mar 2018 02:02:18 -0600 Subject: migrate pdf_viewer to dynamic import --- config/webpack.config.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 20d95ff22a1..1e181363fc1 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -45,7 +45,6 @@ function generateEntries() { const manualEntries = { monitoring: './monitoring/monitoring_bundle.js', mr_notes: './mr_notes/index.js', - pdf_viewer: './blob/pdf_viewer.js', protected_branches: './protected_branches', registry_list: './registry/index.js', sketch_viewer: './blob/sketch_viewer.js', @@ -224,7 +223,6 @@ const config = { chunks: [ 'monitoring', 'mr_notes', - 'pdf_viewer', 'registry_list', 'ide', ], -- cgit v1.2.1 From 9d9d0105947e4cc23f150135e0c904d6ad31f315 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Thu, 1 Mar 2018 02:11:07 -0600 Subject: migrate sketch_viewer to dynamic import --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 1e181363fc1..acc52fd7234 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -47,7 +47,6 @@ function generateEntries() { mr_notes: './mr_notes/index.js', protected_branches: './protected_branches', registry_list: './registry/index.js', - sketch_viewer: './blob/sketch_viewer.js', stl_viewer: './blob/stl_viewer.js', terminal: './terminal/terminal_bundle.js', two_factor_auth: './two_factor_auth.js', -- cgit v1.2.1 From ce4dd19e09612dc9347b055190f86d805cdc8ef3 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Thu, 1 Mar 2018 02:21:08 -0600 Subject: migrate stl_viewer to dynamic import --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index acc52fd7234..e10b0513f3a 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -47,7 +47,6 @@ function generateEntries() { mr_notes: './mr_notes/index.js', protected_branches: './protected_branches', registry_list: './registry/index.js', - stl_viewer: './blob/stl_viewer.js', terminal: './terminal/terminal_bundle.js', two_factor_auth: './two_factor_auth.js', -- cgit v1.2.1 From 41bba60490afd007ff859e39979a4080170e712f Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Thu, 1 Mar 2018 11:34:13 -0600 Subject: remove common_vue CommonsChunk config --- config/webpack.config.js | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index e10b0513f3a..cd7fec48c31 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -215,20 +215,6 @@ 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: [ - 'monitoring', - 'mr_notes', - 'registry_list', - 'ide', - ], - 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'], -- cgit v1.2.1 From d79df7baf7426ca865958b9a5fecb0690a6a6ba3 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Thu, 1 Mar 2018 18:13:50 +0000 Subject: Remove u2f webpack bundle --- config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index cd7fec48c31..fd0bfb59e65 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -57,7 +57,6 @@ function generateEntries() { ide: './ide/index.js', raven: './raven/index.js', test: './test.js', - u2f: ['vendor/u2f'], webpack_runtime: './webpack.js', }; -- cgit v1.2.1