Live data from Hacker News

Vite+ Beta

voidzero.dev

11–20 of 163 posts

Re: Vite+ Beta

#12

Earlier quoted context omitted.

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.

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?

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.

Re: Vite+ Beta

#13

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.

Naming is worrisome!

Re: Vite+ Beta

#14

Earlier quoted context omitted.

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.

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 if you need precompilation in CI can't you simply use... tsc?

Re: Vite+ Beta

#15

Can it be used for Node builds or browser-only same as Vite?

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!

I'd be interested in seeing this implementation if it's publicly available. Do you have a GitHub link? Thanks!

Re: Vite+ Beta

#16

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.

I think that used to be the idea but then they got acqui-hired

Re: Vite+ Beta

#17

Earlier quoted context omitted.

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.

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?

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

Re: Vite+ Beta

#18

Earlier quoted context omitted.

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?

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

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.

This is especially hairy when making a typescript library that is distributed non-compiled (without dist/) and is supposed to run in both browser and Node.

https://github.com/nodejs/node/issues/46006

https://github.com/microsoft/TypeScript/issues/16577

Re: Vite+ Beta

#19

Earlier quoted context omitted.

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.

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?

Yes, I use tsx for Node programs. It's not great when sharing the same codebase for both client and server code, they have completely different dev workflows.

Re: Vite+ Beta

#20

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

How do you bundle web workers that import dependencies? iirc the issue in esbuild for that is still open and users are manually building their workers as separate entry points, which is very fragile.
Post reply on HN