summaryrefslogtreecommitdiff
path: root/config/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r--config/webpack.config.js21
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';