-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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]: build error using typescript decorators when upgrade react-vite to 8.0.6 #26780
Comments
@hulh122 so fast you are, I found the bug almost at the same time. To Reproduce
System
|
Hi @hulh122 In Storybook 8, we changed the default component analysis tool from You can read about this in the migration guide: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#react-docgen-component-analysis-by-default I want to try out, whether the error disappears if you use the former default export default {
+ typescript: {
+ reactDocgen: "react-docgen-typescript",
+ },
}; Please let me know whether this has helped! In the meantime I try to figure out your options of setting the mentioned babel configuration to allow to parse the decorator before export statements. |
Sorry, I have tried Here is my result after change reactDocgen to |
One idea to try is to supply your own |
@vanessayuenn Is there a plan to support the feature official? |
Describe the bug
Problem
I meet the build error when i use the react-vite@8.0.6.
Reason
In our project, we use the decorators in typescript, such as:
@GET export class Service {}
After upgrade to 8x and build the storybook, reat-docgen seems meeting some build errors which found that babel should set decoratorsBeforeExport: true.
But I can not find a good way to set the babel config to work. I use the setting babel / babelDefault. But not working
To Reproduce
https://stackblitz.com/edit/github-vp3hr9?file=src%2FApp.tsx,src%2Fstories%2FButton.tsx&preset=node
try
yarn build-storybook
System
System: OS: Linux 4.19 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish) CPU: (232) x64 AMD EPYC 7K83 64-Core Processor Shell: 5.1.16 - /bin/bash Binaries: Node: 20.5.1 - /usr/bin/node npm: 10.4.0 - /usr/bin/npm pnpm: 8.15.1 - /usr/bin/pnpm <----- active
Additional context
No response
The text was updated successfully, but these errors were encountered: