20 ms·
For your case 1 my extended obfuscator does do preprocessor style stuff, but that is a giant hack. For case 2 you can use esbuild, not something like webpack.
by fidotron 2y ago
For your case 1 my extended obfuscator does do preprocessor style stuff, but that is a giant hack.
For case 2 you can use esbuild, not something like webpack. Sub second builds are completely normal if you pick the right bundler. Tbh esbuild is the killer thing that moved this mode of js development into being acceptable from a total mess.
- o11c 2y agoThe problem with `esbuild` is that it silently does the wrong thing whenever there are type errors. The main job of a compiler is producing error messages; actually producing an output file is secondary. `tsc` is so slow that it seems the least bad approach in use is "automatically run it asynchronously in the background", which is not confidence-inspiring.
- supermatt 2y agoYou can separate type checking and building. Have tsc to check types and esbuild to build. These can run in parallel, or at different stages of your pipeline. The background asynchronous incremental typechecking is how most typescript devs are working anyway, as issues are immediately highlighted or otherwise output in your dev environment of choice (whether that be inline, or as output in the console).