Open jdvivar opened 2 years ago
Hi
I've got this error when doing a build-storybook (wds works perfectly when serving locally though):
build-storybook
Add @babel/plugin-syntax-import-assertions (https://git.io/JUbkv) to the 'plugins' section of your Babel config to enable parsing.
I'm not sure how to fix it since I think I only have control over Rollup plugins, as explained here https://modern-web.dev/docs/dev-server/plugins/storybook/#customizing-the-build
I've tried this without success on .storybook/main.js:
.storybook/main.js
const { babel } = require('@rollup/plugin-babel'); module.exports = { rollupConfig(config) { config.plugins.push(babel({ plugins: [ [require.resolve('@babel/plugin-syntax-import-assertions')] ] })); return config; }, };
Any help or hint about how to proceed?
Maybe @LarsDenBakker :)
Hi
I've got this error when doing a
build-storybook
(wds works perfectly when serving locally though):I'm not sure how to fix it since I think I only have control over Rollup plugins, as explained here https://modern-web.dev/docs/dev-server/plugins/storybook/#customizing-the-build
I've tried this without success on
.storybook/main.js
:Any help or hint about how to proceed?