Repository navigation
Replies: 4 comments 10 replies
|
For me, no. I find it confusing since a normal Vite app by |
|
My response to the two quotes are at https://github.com/vitejs/vite/discussions/9442#discussioncomment-3287233 and https://github.com/vitejs/vite/discussions/9442#discussioncomment-3289064 for reference.
Perhaps it is, but then having |
|
My cents are - we'd recommend providing your custom CLI for that instead. But after the object-style hooks, there is nothing preventing you from doing that if you insist. Just take your own risk and be cautious about plugin compatibility and side effects. Similar to |
|
Here is a recap of today's team meeting regards on this topic (sorry we forgot to record it) The Vite team stands in the position that we don't recommend such usage.
That said, it is still technically possible to do so after #9634. Thus, we consider it non-blocking and out-of-scope of Vite core. This means we are drawing the line that we won't provide future support and guarantee on such usage. We recommend higher-level integrations to provide their own CLI to fit various needs. For example, a framework could proxy other Vite subcommands but only provide custom logic for its Thanks for bringing this discussion up. |
Uh oh!
There was an error while loading. Please reload this page.
Both SvelteKit and vite-plugin-ssr use a
writeBundle()/closeBundle()hook in order to make$ vite buildalso build SSR code.Question: should Vite have built-in support for making
$ vite buildalso build SSR code?From @aleclarson:
From @benmccann:
Also, I'd argue that one
vite.config.jsshould correspond to one$ vite buildcall: as a user, anything else seems confusing, I think.As for vite-plugin-ssr, I think it's neat to re-use Vite's CLI instead of having a vite-plugin-ssr CLI just for fixing
$ vite build. Vite's CLI can be used seamlessly with vite-plugin-ssr which I think is neat: https://github.com/brillout/vite-plugin-ssr/blob/ff0cb6b7caebf8d797670a68aac7f761cf7e10d4/examples/vue-full/package.json#L3-L5. Actually, thanks to thewriteBundle()trick and theconfigureServer()hooks,vite-plugin-ssrdoes not have any CLI: it just extends Vite's CLI.There is a push back from @bluwy and @antfu.
All reactions