frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Vite+ Beta

https://voidzero.dev/posts/announcing-vite-plus-beta
39•Erenay09•1h ago

Comments

ivanjermakov•48m ago
Can it be used for Node builds or browser-only same as Vite?
curtisblaine•40m ago
I'm always curious of the use case when someone proposes Node code bundling. What's the advantage? Obfuscation in SEA?
ivanjermakov•35m ago
Running typescript without compilation is still tricky with plain Node. `vite dev` has amazing DX not available for Node programs. I'm wondering if Vite+ tackles this problem.
curtisblaine•29m ago
Don't we have `tsx` and `nodemon` (or the native Node reloader) for that? What are the DX gaps you see on the server side out of on-the-fly transpilation and reload on watch?
afavour•23m ago
One advantage of precompilation is risk reduction. Say tsx gets hacked somehow (hardly unprecedented with Node modules!) you’ve got it running on your production server exposed to the internet. Precompilation on a CI pipeline is still a risk but a significantly lower one.
curtisblaine•20m ago
@afavour if you need precompilation in CI can't you simply use... tsc?
Cthulhu_•9m ago
In theory, typescript doesn't need to be transpiled, you can run ts files using `node --experimental-strip-types file.ts` as long as you don't use any code that needs transpilation (like typescript enums).

Still need tsx to do type checking

ivanjermakov•45s ago
No, because of ESM import resolution rules. Typescript suggests extensionless imports, making it incompartible with ESM and therefore Node. Luckly, `node --import=tsx file.ts` handles imports well.
afavour•27m ago
In my experience the bundling isn’t really the important aspect (though it also doesn’t harm anything), it’s more just having an ecosystem of plugins for code transpiling, static asset inclusion (e.g. text files) etc and a configuration format folks are already used to.
tvbusy•39m ago
It uses Vite so the same limitations as Vite. However, I have been using Vite for my NestJS servers without any problem with `vite-plugin-node`. See example at https://github.com/leosuncin/nest-vite-example/blob/master/v...
TheAlexLichter•26m ago
I am using Vite+ for CLIs as well, yes. You don't use Vite as dev server then but lint, format, task running and caching is still there!
bdxn•14m ago
I'd be interested in seeing this implementation if it's publicly available. Do you have a GitHub link? Thanks!
colesantiago•29m ago
Is there a subscription with this?

I'm just wary about anything with a '+' and I assume there is a subscription attached to it.

Looking at this it doesn't look like it.

khurs•27m ago
Says:

"It is fully open source under the MIT license"

dandaka•22m ago
Naming is worrisome!
bouk•12m ago
I think that used to be the idea but then they got acqui-hired
incrudible•27m ago
I have removed vite because dev build and reload is noticable slower than just esbuild and browser refresh. Vite does nothing for me that an LLM can not just trivially rebuild in a bespoke manner.

YMMV