Skip to content

Commit

Permalink
Merge pull request #26024 from storybookjs/jeppe/25964
Browse files Browse the repository at this point in the history
Addon-docs: Fix pnpm+Vite failing to build with `@storybook/theming` Rollup error
  • Loading branch information
JReinhold authored Feb 14, 2024
2 parents f94366e + c64041e commit 50edeef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion code/addons/docs/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,14 @@ export const viteFinal = async (config: any, options: Options) => {
react,
'react-dom': reactDom,
'@mdx-js/react': mdx,
/**
* The following aliases are used to ensure a single instance of these packages are used in situations where they are duplicated
* The packages will be duplicated by the package manager when the user has react installed with another version than 18.2.0
*/
'@storybook/theming': dirname(require.resolve('@storybook/theming')),
'@storybook/components': dirname(require.resolve('@storybook/components')),
'@storybook/blocks': dirname(require.resolve('@storybook/blocks')),
},
dedupe: ['@storybook/theming', '@storybook/components', '@storybook/blocks'],
},
}),
};
Expand Down

0 comments on commit 50edeef

Please sign in to comment.