summaryrefslogtreecommitdiff
path: root/storybook
diff options
context:
space:
mode:
Diffstat (limited to 'storybook')
-rw-r--r--storybook/config/webpack.config.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/storybook/config/webpack.config.js b/storybook/config/webpack.config.js
index c67f79b55a0..4382ba43f21 100644
--- a/storybook/config/webpack.config.js
+++ b/storybook/config/webpack.config.js
@@ -5,6 +5,7 @@ const path = require('path');
const sass = require('node-sass'); // eslint-disable-line import/no-unresolved
const { buildIncludePaths, resolveGlobUrl } = require('node-sass-magic-importer/dist/toolbox'); // eslint-disable-line import/no-unresolved
const webpack = require('webpack');
+const IS_JH = require('../../config/helpers/is_jh_env');
const gitlabWebpackConfig = require('../../config/webpack.config');
const ROOT = path.resolve(__dirname, '../../');
@@ -13,11 +14,20 @@ const TRANSPARENT_1X1_PNG =
const SASS_INCLUDE_PATHS = [
'app/assets/stylesheets',
'app/assets/stylesheets/_ee',
+ 'app/assets/stylesheets/_jh',
'ee/app/assets/stylesheets',
'ee/app/assets/stylesheets/_ee',
'node_modules',
].map((p) => path.resolve(ROOT, p));
+if (IS_JH) {
+ SASS_INCLUDE_PATHS.push(
+ ...['jh/app/assets/stylesheets', 'jh/app/assets/stylesheets/_jh'].map((p) =>
+ path.resolve(ROOT, p),
+ ),
+ );
+}
+
/**
* Custom importer for node-sass, used when LibSass encounters the `@import` directive.
* Doc source: https://github.com/sass/node-sass#importer--v200---experimental