Skip to content

Commit a8c49d4

Browse files
committed
storybook(rn): ensure CommonJS plugin processes all deps by including /node_modules/ in build.commonjsOptions.include\n\nFixes a logic bug where setting include to only /react-native-jazzicon/ restricted @rollup/plugin-commonjs to that package, potentially breaking other CJS deps during production builds. Adding /node_modules/ preserves broad CJS conversion while still explicitly handling react-native-jazzicon.
1 parent d774a13 commit a8c49d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/storybook-react-native/.storybook

apps/storybook-react-native/.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const config: StorybookConfig = {
7474
commonjsOptions: {
7575
// Explicitly include CJS-only packages so Rollup's commonjs plugin
7676
// converts them to ESM in the production bundle.
77-
include: [/react-native-jazzicon/],
77+
include: [/react-native-jazzicon/, /node_modules/],
7878
transformMixedEsModules: true,
7979
},
8080
},

0 commit comments

Comments
 (0)