-
-
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
framework-preset-vue requires babel-preset-vue
but does not depend on it
#4475
Comments
@igor-dv this seems to be your area of expertise? |
Yeah, that's probably a bug. I am not sure what should really be in vue, maybe @pksunkara can assist (also why the CLI tests are green 🤔 ?) Regarding the presets, I just changed what was before into presets.,. we were extending a default babel config before, maybe it's already not relevant. @pksunkara what prevents us from integrating the vue-plugin you wrote into the |
Old vue projects? |
@igor-dv - I haven't really been following the preset stuff, but I'll just add the same vue project works fine with SB@3.4. In that case we do some tweaks to make it work, but the So either |
I think we need some help from the vue people that know better what is supported and what should be done... @pksunkara, what do you mean by "old projects"? Can't we make SB/vue@4 work for the new projects? |
I meant vue cli plugin won't work with old projects. |
And should we support the old projects in SB/vue@4 itself? |
I'm confused here. AFAICT this is a blocker for the 4.0 release---any chance we can get some clarity on this in the next day or so? |
I did some more investigation into this. Here's what I found.
|
The question is do we even need this plugin? |
I have no idea. It isn't clear to me what the difference between I'm not sure why the vue add-on requires |
This was removed in e496dfb Probably we should not even be using this preset (see #4475 (comment)), but we are, so I will add this for now to get it working.
In the interests of not blocking the SB4 release: #4535 There may be better solutions, but AFAICT this works and doesn't introduce problems. We can do a better fix in a 4.0.1 perhaps? |
I wouldn't care about this until we improve our configuration/preset system. |
I use vue-cli@3 , I encountered the same problem on window 10 |
I was running into the same problem - just started using Storybook today and trying to get it to work with a Vue project I have. Seemed like a simple set of steps to reproduce:
Also, I was running into #4065. As it turns out, I was stuck on Vue CLI v2.9.6.Updating to |
Hi, I've the same problem with |
Have you installed it? |
I ran into this problem while migrating from webpack 3/stroybook 3 to webpack 4/storybook 4. |
@breadadams's solution doesn't seem right to me, but there's not enough context there to say what the right solution is. Please paste the complete error with stacktrace @crusenov |
@ndelangen why was this issue closed? If it is resolved, could you summarize the changes? |
Ow I just looked at the issue @crusenov was having and though that there wasn't much left to do on that. but I see now it's unrelated to the original ticket, I'll re-open. Thanks |
@ndelangen I'm using vue cli storybook without webpack config. When trying to build the app there are errors related to importing files which paths starts with @ instead of src. As @breadadams suggested I've created webpack alias for @. After that I've encountered another issues with @. |
You need to add your custom loaders (looks like you're using stylus) to the storybook webpack config too @crusenov. The current issue really isn't related to this though, storybookjs/vue-cli-plugin-storybook#23 looks to be more suited, or open a new issue if you believe there's a bug. Thanks! |
It is 2020 and What do we need to do here? As @pksunkara mentioned, we could just get rid of it altogether? Nobody creating a new project today would use Babel 6. /Edit: If anyone wants a quick workaround, I created a minimal Storybook-Vue-TS repository which uses a patch file to get rid of this requirement. |
@graup any chance you can take a crack at this? We’re working on storybook 6.0 right now, so there’s never been a better time to make a breaking change |
Would we be dropping support for Babel 6 based projects as a whole? If yes, then we can simply remove it. Otherwise, maybe it is better to write a different preset which is for Vue projects with Babel 6 and remove this from the main preset. |
OK, I'll work on this. I can make a version that has some sort of migration path for Babel 6 users. |
@graup let me know if you need any help? |
See the vue-kitchen-sink app for a migration path. Basically you just need to add the preset to your or storybook's babel config.
Here's a small update. While working on #10813 I tried to remove As far as I can tell, the SFC_VUE e2e test does this:
My questions:
I think what we need to do is
Some more code references:
|
Gadzooks!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-beta.12 containing PR #10813 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
YES 💯x 💯 ! |
Gadzooks!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-beta.14 containing PR #10909 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
Bug or support request summary
When using SB in a vue app, this line runs:
https://github.com/storybooks/storybook/blob/71be40518b0e42e93ad37dc4669d10dc2a1d4159/app/vue/src/server/framework-preset-vue.js#L32
I'm not sure if it should even be running that line, as this project has a
babel.config.js
which contains:Steps to reproduce
npx -p @vue/cli vue create --preset hichroma/vue-preset-learnstorybook taskbox cd taskbox npx -p @storybook/cli@rc sb init yarn storybook
You'll see:
babel-preset-vue
is not a (peer) dependency of@storybook/vue
, and I don't think it should be being used at all.Please specify which version of Storybook and optionally any affected addons that you're running
Affected platforms
Dependencies of app:
The text was updated successfully, but these errors were encountered: