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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-29 03:08:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-29 03:08:52 +0300
commit21b8ed2e35ee50538ddb2e48ad2b04de2eba43d6 (patch)
treed6e65cb4660e9aa2d79fbcee590c68b317ba204d /storybook
parent71d6b9014bef64436bbd996667e6458ebde561c4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'storybook')
-rw-r--r--storybook/config/webpack.config.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/storybook/config/webpack.config.js b/storybook/config/webpack.config.js
index 51aaa1e18a6..a10ae0887ff 100644
--- a/storybook/config/webpack.config.js
+++ b/storybook/config/webpack.config.js
@@ -9,6 +9,12 @@ const IS_EE = require('../../config/helpers/is_ee_env');
const IS_JH = require('../../config/helpers/is_jh_env');
const gitlabWebpackConfig = require('../../config/webpack.config');
+const ROOT_PATH = path.resolve(__dirname, '..', '..');
+const EMPTY_VUE_COMPONENT_PATH = path.join(
+ ROOT_PATH,
+ 'app/assets/javascripts/vue_shared/components/empty_component.js',
+);
+
const buildIncludePaths = (nodeSassIncludePaths, previouslyResolvedPath) => {
const includePaths = [];
if (path.isAbsolute(previouslyResolvedPath)) {
@@ -144,6 +150,22 @@ module.exports = function storybookWebpackConfig({ config }) {
// Silence webpack warnings about moment/pikaday not being able to resolve.
config.plugins.push(new webpack.IgnorePlugin(/moment/, /pikaday/));
+ if (!IS_EE) {
+ config.plugins.push(
+ new webpack.NormalModuleReplacementPlugin(/^ee_component\/(.*)\.vue/, (resource) => {
+ resource.request = EMPTY_VUE_COMPONENT_PATH;
+ }),
+ );
+ }
+
+ if (!IS_JH) {
+ config.plugins.push(
+ new webpack.NormalModuleReplacementPlugin(/^jh_component\/(.*)\.vue/, (resource) => {
+ resource.request = EMPTY_VUE_COMPONENT_PATH;
+ }),
+ );
+ }
+
const baseIntegrationTestHelpersPath = 'spec/frontend_integration/test_helpers';
// Add any missing aliases from the main GitLab webpack config