Skip to content

Commit

Permalink
Add excludes for non-react framework react plugin
Browse files Browse the repository at this point in the history
We just need it for processing mdx, it doesn't need to hmr anything.
  • Loading branch information
IanVS committed Aug 29, 2022
1 parent 8600512 commit 6ae6b64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/lib/builder-vite/src/vite-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export async function pluginConfig(options: ExtendedOptions) {

// We need the react plugin here to support MDX in non-react projects.
if (frameworkName !== '@storybook/react-vite') {
plugins.push(viteReact());
plugins.push(viteReact({ exclude: [/\.stories\.([tj])sx?$/, /node_modules/, /\.([tj])sx?$/] }));
}

if (frameworkName === 'preact') {
Expand Down

0 comments on commit 6ae6b64

Please sign in to comment.