diff --git a/code/frameworks/react-native-web-vite/src/preset.ts b/code/frameworks/react-native-web-vite/src/preset.ts index a082f443420a..8e3d7d6b58a8 100644 --- a/code/frameworks/react-native-web-vite/src/preset.ts +++ b/code/frameworks/react-native-web-vite/src/preset.ts @@ -90,7 +90,7 @@ export const viteFinal: StorybookConfig['viteFinal'] = async (config, options) = return mergeConfig(reactConfig, { optimizeDeps: { esbuildOptions: { - plugins: [esbuildFlowPlugin()], + plugins: [esbuildFlowPlugin(new RegExp(/\.(flow|jsx?)$/), (_path: string) => 'jsx')], }, }, } satisfies InlineConfig);