-
-
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
Storybook 6 with Vue.js doesn't support optional chaining #11515
Comments
I've found the culprit, it looks like the |
So this is a |
Yes 🙂 |
Cool. Closing! |
@DavidRouyer Thanks David. high fives |
Actually, I don't know if changing the |
Configuring babel worked for me, see e.g. vuejs/vue-loader#1697 (comment) |
@githubuser234 @shilman @DavidRouyer I just write a demo repo to reproduce the bug. Steps as below. step1: use vuecli to create project. step2: use npx to init storybook. step3: use optional chain inside vue component step4:
|
@DavidRouyer Thank you so much, you save my day 😭 |
Changing the babel config did not work and we don't really want to downgrade the es target. Is there any other solution/workaround? 😕 |
I am not using esTarget at all (no Typescript) and this error still pops up ? Any help ? |
In case anyone else ends up here that's
What worked for me was upgrading to webpack 5 in main.js
// .storybook/main.js
module.exports = {
core: { builder: 'webpack5' },
}; |
Describe the bug
Storybook 6 with Vue.js doesn't support optional chaining with the zero config TypeScript.
To Reproduce
Steps to reproduce the behavior:
Button.vue
Expected behavior
The code should not throw an error.
Screenshots
If applicable, add screenshots to help explain your problem.
Code snippets
If applicable, add code samples to help explain your problem.
System:
Please paste the results of
npx -p @storybook/cli@next sb info
here.Additional context
The vue-cli example doesn't not work out of the box, some dependencies are missing.
You can see the reproduction here: https://github.com/DavidRouyer/storybook-vue-cli-example
I've added the missing dependencies in DavidRouyer/storybook-vue-cli-example@77a14b8
I've added the code which breaks the build in DavidRouyer/storybook-vue-cli-example@38f7ccc
The text was updated successfully, but these errors were encountered: