-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Storybook 7 + Vite + Flow not working #21816
Comments
Unfortunately, Storybook no longer supports Flow. Is there some kind of customization you can do with |
I'm not sure what else I can do, the Vite configuration is correct, it's something into SB that's not consuming it correctly Do you have some special code reading the stories files? |
I see that everything seems to work as soon I replace TypeScript with Flow in the https://github.com/storybookjs/storybook/blob/next/code/lib/csf-tools/src/babelParse.ts#L8 I wonder if Storybook could expose an option to specify Flow in place of TypeScript there? I suppose that's what the comment in the source code meant? |
Hello, same issue here with Webpack. Trying to upgrade to StoryBook 7 and it choke on Flow syntax in stories. This used to be fine in 6.x. // webpack.config.js
module.exports = ({ config, mode }) => {
config.module.rules.push({
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
babelrc: false,
presets: [[require.resolve(/* our preset with Flow plugins */)]],
},
},
});
}; |
The same thing happens with migration codemods since the TS parser is used by default.
|
Son of a gun!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.1.0-alpha.9 containing PR #21859 that references this issue. Upgrade today to the
|
Describe the bug
Flow annotations in stories are not parsed, the same configuration works correctly with just Vite.
To Reproduce
https://github.com/FezVrasta/default-js
yarn dev
, observe everything works correctly.yarn storybook
, observe it errors while parsing the Button.stories.js file.System
Additional context
No response
The text was updated successfully, but these errors were encountered: