-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
fix: remove builder.entireApp
#18028
Conversation
Run & review this pull request in StackBlitz Codeflow. |
Let's discuss about this one after we merge the PR. We can point to |
I like this.
I have one question about this one. Is it easily possible to detect whether it was called with |
I guess you could check |
@patak-dev Do you have any thoughts here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should give frameworks a way to have a clean vite build
in the future. Once they start using buildApp()
, it probably doesn't make sense to use vite build
to only build the client anymore (there may be other steps between environments that are needed, the client build may need info from other environment builds, etc). Having every app needing to add --app
could lead to confusion and hard to debug errors (we could add a warning if there is a buildApp()
though). For frameworks like SvelteKit, it would also count as a DX regression. They are currently able to make vite build
generate the whole app (through the writeBundle
hook hack). Once they move the environments, they will need to update every package.json build script to be vite build --app
. I think they won't accept this to be honest, and it may be a blocker for them.
Having said that, I'm approving the PR, because if you'd like to release Vite 6 without entireApp
, we can always add this later, maybe with a different option or using buildApp()
as a way to opt-in.
I personally don't think it should be a blocker since SvelteKit often has a migration script to handle that. And I think I'll ping them though if they have thoughts about this, but I also agree that if we add this later on it can be a feature. |
suddenly requiring to add If at all i'd say let |
It's not required to add IIUC the builder API is also experimental (I heard it was but we don't mark it as experimental 🤔), so pushing for |
My take here is that we will still need something like what we are removing in this PR, or SvelteKit will keep using the |
For me, if we do want The CLI and JS API symmetry feels more important to me, than whether |
We decided to go with #18432, that would allow SvelteKit and others to keep using |
Description
The idea I had for #16471 (comment). Feel free to let me know too if this is a bad idea
What I'm thinking is that
build.entireApp
currently has a different meaning:build()
orcreateBuilder()
With this PR, I removed the
build.entireApp
option entirely and let frameworks manage them themselves.--app
, they should callcreateBuilder
or ensure thevite
CLI is called with--app
build()
(same as before, not changed)--app
, or frameworks can expose an option to pick between both.