-
-
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
Storybook vue type checking not working #14987
Comments
Is that type error in a |
@shilman On a |
I think the built-in type checking only works on .ts/.tsx files (not entirely sure) |
@shilman Adding the issue on a |
Investigated, then found the root cause. However, I'm not sure which approach should I take to fix it. The problem
Possible fixesA) Change
|
I don't remember 100%, I believe we had some offline discussions involving @mrmckeb and this PR, after which we concluded that Vue just works better with ts-loader. Option A sounds good to me too. I'm not sure why we didn't include that back when we added zero-config ts. I believe at that time it was just assumed that most people don't want type-checking in their storybook builds due to the performance overhead it introduces. That |
#14987 TypeScript checks in `@storybook/vue` has not been enabled. This commit enables users to turn on type checking process powered by ts-loader. From performance perspective, fork-ts-checker-webpack-plugin is better especially for large projects. However, it needs one of 1) modifying type-checker options in each builders or 2) adding fork-ts-checker-webpack-plugin as a dependency of `@storybook/vue`. I think both comes with huge downsides and it should be done in user side by setting `typescript.check: false` and configuring the plugin manually.
Yay!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.3.0-beta.5 containing PR #15089 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
Describe the bug
After enabling type check in vue, I would expect to see the errors when building, but nothing happens.
To Reproduce
1- Add typescript check:
2- Add any type error in a
vue
file3- Run
npm run storybook
It doesn't complain.
System
The text was updated successfully, but these errors were encountered: