-
Notifications
You must be signed in to change notification settings - Fork 106
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
Babel configuration #286
Comments
There has been a little talk of finding a better way, yes. So far there have been no concrete proposals of how to improve it, though. We're open to suggestions! |
Can it use |
You can configure the vite I'd really like to make it easier to configure babel for vite react storybook projects. |
@IanVS sorry for late reply. For us in the current project, the problem is that vite-builder is using the predefined vitejs config from this repository. And I didn't see any way to provide extended config other than OP posted. Maybe additional import of vite config of project inside predefined from builder? Even with the solution you've provided, you have to modify it in |
Yes, that's right, the only way right now is with There are some experiments going on right now that would change the way framework and builder packages work together, and I think if that turns out to work, it'll be a lot easier to set options like this, so I'd like to wait a little longer to see how that shakes out, before we think about adding an option to the global storybook config. I'd suggest using the approach posted above for now. |
Yes, for now it's a valid solution that works, and we're talking about storybook environment, so it's not affected for production build. Looking forward to then, thank you! |
I have the same issue, but I have a delta, when I remove the default config to use mine it looks like lot of additional files are proceed by babel for no reason. |
For anyone still dealing with this, you can now try out storybook 7 (in alpha currently, not very stable), which uses your |
@IanVS that's awesome to hear! Do you know if Storybook 7 has a target stable/release date? Our deployed instance of Storybook is not crucial however I'm wary of jumping onto a prerelease version in case it impacts development cycles. |
I haven't heard any recent estimates, but I think it will likely go into beta in October or November, and then stable release at the end of this year or beginning of next. Totally understandable about not wanting to risk churn with prerelease versions. I'd love if you were willing to test it out, though, and report any issues you might come across. That's how we can help ensure the smoothest transition when we release the stable version, through early feedback from users. :) |
Hey @IanVS , we (myself and @develohpanda) are currently updating our Storybook to v7 alpha with vite, and are experiencing some discrepancies between our I'd appreciate any help I can get on this! Please let me know if I can add more info or if this should be posted elsewhere. |
Thanks @jcollicoat, I replied in an issue, https://github.com/jcollicoat/vite-storybook/issues/1, since it's not really related to Babel configuration (this issue here). |
Just to confirm, the vite.config.ts loaded and used by default. |
Yea, in 7.0 it is loaded automatically. This repo is for the 6.5 version, in 7.0 it moved into the main monorepo. |
Wanting a bit of clarification here, even if my project is on vite, sb7 still needs to use Babel? We are pure esbild and would like to avoid if possible. |
SB7 does not use babel in and of itself. If you're using |
Is there a more elegant way to configure the
babel
options yet? I am currently hacking myviteFinal
config to enable theformatjs
plugin like this:This feels a bit brittle. I'm sure there was talk of a better way to handle this as it seems like a common use case. Anything on the radar?
The text was updated successfully, but these errors were encountered: