-
-
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
Builder-Vite: use user's build.target #23123
Builder-Vite: use user's build.target #23123
Conversation
Hi @Hoishin, Thank you very much for this PR. I don't feel very confident about merging this PR. This change could potentially cause the application to stop working. Therefore, since this is a potential breaking change, I would like to merge this PR for SB 8.0 after internal consultation. Until then, the already mentioned workaround can be used: async viteFinal(config) {
return mergeConfig(config, {
build: {
target: 'esnext'
},
});
}, I hope you understand our worries. |
@valentinpalkovic do you mean to say that storybook cannot be built with that target? Or when you say "cause the application to stop working", do you somehow mean the user's application itself? I do agree that this is likely best left to 8.0, just curious if there are specific concerns about storybook being incompatible with different targets other than the default. |
@IanVS As far as I remember, we discussed this internally. We concluded that merging this PR could potentially break Storybook since the target might differ from the default one, and unexpected behavior might pop up. This is a precaution rather than basing the decision on some incidents in the past. |
This makes sense, but on the other hand if Storybook is using a target that is different from the one specified in the user's vite config, I could also see that as being a bug, since their SB won't match their application. Personally I think it wouldn't be bad to release it before 8.0, but don't feel strongly one way or the other, especially since there's a pretty straightforward workaround. |
b8f97f0
into
storybookjs:release-8-0
Closes #22223
What I did
If user has
build.target
in Vite config, use it for Storybook's Vite config.How to test
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]