Re:TC39 Proposal: Type Annotations
by klodolph on Wednesday June 08, 2022 @05:42PM
(#31674690)
This makes both irrelevant, since you can already run code without bundling.
Obviously it’s not something you’d do in a normal production environment. It’s nice to be able to run code without any compilation steps if you’re working on something small (e.g. some demo on my personal website) or something in a development environment.
I’ve done this. Served up JS with “import” statements everywhere. The devserver just served JS straight from the filesystem without modification. When I change the JS, the browser just needs to reload—there’s no build process, no waiting. The production environment ran it all through Closure. Closure also ran in the dev environment, but it ran asynchronously, in the background, telling you what the errors are.
No source maps to deal with. No delays. The browser gets exactly what I write.
Re:TC39 Proposal: Type Annotations
by brundolf on Wednesday June 08, 2022 @06:12PM
(#31675044)
Sure, it's just that very few companies are probably going to be doing this outside of very early prototypes/toy examples. Load time is just too important
Obviously it’s not something you’d do in a normal production environment. It’s nice to be able to run code without any compilation steps if you’re working on something small (e.g. some demo on my personal website) or something in a development environment.
I’ve done this. Served up JS with “import” statements everywhere. The devserver just served JS straight from the filesystem without modification. When I change the JS, the browser just needs to reload—there’s no build process, no waiting. The production environment ran it all through Closure. Closure also ran in the dev environment, but it ran asynchronously, in the background, telling you what the errors are.
No source maps to deal with. No delays. The browser gets exactly what I write.