Open liang1403 opened 5 months ago
Did you have any luck with this one?
Hi everyone, please double-check your .storybook/main.ts
file. I faced this issue because I ended up overriding the default config.build
and config.build.rollupOptions
properties.
To fix this, I simply needed to extend the default config using the spread operator.
async viteFinal(config) {
return {
...config,
esbuild: {
jsx: 'automatic',
},
build: {
...config.build, // 👈🏻
rollupOptions: {
...config.build.rollupOptions, // 👈🏻
onwarn(warning, warn) {
// Suppress "module level directives cause errors when bundled" warnings
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') {
return;
}
warn(warning);
},
},
},
};
},
Describe the bug
base-portal-lib - is root library of project in a monorepo. Why is iframe.html created in it instead of base-portal-lib/storybook-static?
P.S.: Also later it randomly hangs on transforming TS files...
To Reproduce
Configuration: Vue 3 + Vite, Storybook 8.0.8 (default setup + msw-storybook-addon)
Just run
npm run build-storybook
System
Additional context
No response