2 ms·
Vite 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 depe
by wruza 2y ago
Vite 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.