You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not necessarily this is to be a feature to be developed inside Vite. Just like Vitest is another project under your umbrella, there could be a project of yours just focused to create these executables/apps to different platforms.
Not always I may install Bun as package manager, so this task to create an executable remains a complicated process, most popular achieved with Electron or Tauri to build executables to PCs. Mobile executables are even worse. Also, many pre-requisites need to be installed in order to Electron or Tauri to work, and also so many options to be configured. So I found it fascinating to see Bun achieving a simple solution.
Bun has achieved it with another limitation in my eyes. Although being straight to the point, Bun tends to be a closed ecosystem, I don't know if they allow plugins yet to extend their features. Vite is always more diverse, and allows plugins, Vite already deals with the build process, all in a single config file, Vite is in my opinion more aligned to the future of JavaScript instead of Bun (rollup/Rust structure/lightningcss), so I was just imagining if this feature could be developed natively in Vite ecossystem.
I would like to note that when Bun tries to create an executable, it doesn't work well with Vite projects, because Bun imports assets with a different syntax from the one allowed in Vite: https://bun.sh/docs/bundler/executables#embed-assets-files
That is another incentive for having this feature to be developed in Vite.
I think like Vitest, this is out of scope for Vite at the moment, and should be developed externally if you have interest in this. We currently can't carry the additional maintenance for this feature.
Description
Bun package manager just created something that, although very convenient, I consider that this innovation would be better in Vite's scope: a simple CLI command that compiles the Vite project in a few seconds to a Windows/MacOS/Linux executable. https://bun.sh/blog/bun-v1.1.5#cross-compile-standalone-executables-with-bun-build-compile
Not necessarily this is to be a feature to be developed inside Vite. Just like Vitest is another project under your umbrella, there could be a project of yours just focused to create these executables/apps to different platforms.
Not always I may install Bun as package manager, so this task to create an executable remains a complicated process, most popular achieved with Electron or Tauri to build executables to PCs. Mobile executables are even worse. Also, many pre-requisites need to be installed in order to Electron or Tauri to work, and also so many options to be configured. So I found it fascinating to see Bun achieving a simple solution.
Bun has achieved it with another limitation in my eyes. Although being straight to the point, Bun tends to be a closed ecosystem, I don't know if they allow plugins yet to extend their features. Vite is always more diverse, and allows plugins, Vite already deals with the build process, all in a single config file, Vite is in my opinion more aligned to the future of JavaScript instead of Bun (rollup/Rust structure/lightningcss), so I was just imagining if this feature could be developed natively in Vite ecossystem.
Suggested solution
To draw inspiration from Bun single-file executable in order to easily build app executables.
https://bun.sh/docs/bundler/executables
Or to serve APIs that could be used by Tauri/Electron or by a plugin, instead of them doing everything dissociated from Vite.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: