diff --git a/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts b/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts index d2f6ec6affbc..c99a1df1da81 100644 --- a/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts +++ b/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts @@ -31,6 +31,10 @@ const getAbsolutePath = (input: I): I => dirname(require.resolve(join(input, 'package.json'))) as any; const storybookPaths: Record = { + // this is a temporary hack to get webpack to alias this correctly + [`@storybook/components/experimental`]: `${getAbsolutePath( + `@storybook/components` + )}/dist/experimental`, ...[ // these packages are not pre-bundled because of react dependencies 'components',