3 ms·
Oh, I briefly looked over Vite but haven't actually used it yet. This is a good opportunity to seriously take a look at it. Is the final HTML and JavaScript co
by Farer 2y ago
Oh, I briefly looked over Vite but haven't actually used it yet.
This is a good opportunity to seriously take a look at it.
Is the final HTML and JavaScript code generated clean and without unnecessary bloat? As always, minimizing the resources that a first-time visitor has to download is one of my main goals as well.
- wruza 2y agoVite minimizes prod builds by default. Generates three bundles, html, js, css. Plus sourcemaps. Can’t tell if any of it can be turned off. As of bloat, it depends on your tsconfig (ts part, not vite). If you set ts up to modern standards (es20xx), it emits code basically verbatim. If you’re gonna support ancient browsers, it will have to emit some es-to-es boilerplate. See tsconfig.json reference for details. Everyone - editor/lsp, tsc, vite, eslint - look into this file. Typescript’s general idea is to just erase types, but they added some es version practicalities cause otherwise that would create a whole “pipeline” yet again for a common use case.