diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /config/webpack.config.js | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r-- | config/webpack.config.js | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index 118aeac0ee1..b81b5611041 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -20,6 +20,7 @@ const WEBPACK_VERSION = require('webpack/package.json').version; const createIncrementalWebpackCompiler = require('./helpers/incremental_webpack_compiler'); const IS_EE = require('./helpers/is_ee_env'); +const IS_JH = require('./helpers/is_jh_env'); const vendorDllHash = require('./helpers/vendor_dll_hash'); const MonacoWebpackPlugin = require('./plugins/monaco_webpack'); @@ -97,6 +98,14 @@ function generateEntries() { watchAutoEntries.push(path.join(ROOT_PATH, 'ee/app/assets/javascripts/pages/')); } + if (IS_JH) { + const eePageEntries = glob.sync('pages/**/index.js', { + cwd: path.join(ROOT_PATH, 'jh/app/assets/javascripts'), + }); + eePageEntries.forEach((entryPath) => generateAutoEntries(entryPath, 'jh')); + watchAutoEntries.push(path.join(ROOT_PATH, 'jh/app/assets/javascripts/pages/')); + } + const autoEntryKeys = Object.keys(autoEntriesMap); autoEntriesCount = autoEntryKeys.length; @@ -126,7 +135,7 @@ function generateEntries() { default: defaultEntries, sentry: './sentry/index.js', performance_bar: './performance_bar/index.js', - jira_connect_app: './jira_connect/index.js', + jira_connect_app: './jira_connect/subscriptions/index.js', }; return Object.assign(manualEntries, incrementalCompiler.filterEntryPoints(autoEntries)); @@ -168,6 +177,16 @@ if (IS_EE) { }); } +if (IS_JH) { + Object.assign(alias, { + jh: path.join(ROOT_PATH, 'jh/app/assets/javascripts'), + jh_icons: path.join(ROOT_PATH, 'jh/app/views/shared/icons'), + jh_images: path.join(ROOT_PATH, 'jh/app/assets/images'), + jh_spec: path.join(ROOT_PATH, 'jh/spec/javascripts'), + jh_jest: path.join(ROOT_PATH, 'jh/spec/frontend'), + }); +} + if (!IS_PRODUCTION) { const fixtureDir = IS_EE ? 'fixtures-ee' : 'fixtures'; |