Closed myheadgonnablow closed 1 year ago
I was able to fix the same issue by adding babelModeV7: true
to features flags. But it's not stated anywhere in the storybook docs. Could we consider adding it?
UPD: also you need to provide your own babel config, if babelModeV7 is set to true This worked for me (as an example)
// babel.config.js
module.exports = {
presets: [
[
'@babel/preset-env',
{
modules: false,
useBuiltIns: 'entry',
corejs: 3,
include: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-optional-catch-binding',
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-optional-chaining',
],
},
],
['@babel/preset-react', { runtime: 'automatic' }],
'@babel/preset-typescript',
],
plugins: ['@babel/plugin-proposal-export-default-from'],
};
We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:
Describe the bug While trying to use lazy compilation after configuring both webpack5 and Storybook 6.5.9 storybook is loading sidebar correctly, however when I try to navigate to any story, I'm getting the error below.
It only appears when
storyStoreV7: true
in my main.jsTo Reproduce main.js
webpack.config (same for ui lib and storybook itself)
our ui lib's package.json
Storybook's package.json
babel.config.js (same for ui lib and storybook)
node console output
browser console output
System
Additional context It only appears when
storyStoreV7: true
in my main.js