Fix storybook in Vue 3

Description

When running storybook in Vue 3, some errors prevent the storybook from building.

yarn storybook:install
VUE_VERSION=3 yarn storybook:start

Some of the special webpack build configuration to make our project run in Vue 3 does not carry over correctly to the storybook webpack build. For example, the wrong vue loader is used:

The vue-loader-vue3 portion is ignored by storybook's webpack and the following package is used:

'/Users/miguelrincon/workspace/gdk/gitlab/storybook/node_modules/vue-loader/lib/index.js',

rules used output
Screenshot_2025-07-16_at_12.45.31 image
debugging info
diff --git a/storybook/config/webpack.config.js b/storybook/config/webpack.config.js
index bd537bb4dd1c..effe5a6a8703 100644
--- a/storybook/config/webpack.config.js
+++ b/storybook/config/webpack.config.js
@@ -279,5 +279,7 @@ module.exports = function storybookWebpackConfig({ config }) {
     }),
   );
 
+  console.log(config.module.rules)
+
   return config;
 };
Edited by 🤖 GitLab Bot 🤖