| ▲ | hsbauauvhabzb 10 hours ago | ||||||||||||||||||||||||||||||||||
I’ve been very lost trying to understand the ecosystem between es versions , typescript and everything else. It ends up being a weird battle between seemingly unrelated things like require() vs import vs async when all I want to do is compile. All while I’m utterly confused by all the build tools, npm vs whatever other ones are out there, vite vs whatever other ones are out there, ‘oh babel? I’ve heard the name but no idea what it does’ ends up being my position on like 10 build packages. This isn’t the desire of people to build legacy support, it’s a broken, confusing and haphazard build system built on the corpses of other broken, confusing and haphazard build systems. | |||||||||||||||||||||||||||||||||||
| ▲ | anematode 8 hours ago | parent | next [-] | ||||||||||||||||||||||||||||||||||
Honestly, Vite is all you need. :) It's super flexible compared to the status quo of require vs. import etc. For example, I recently wanted to ship a WASM binary along with the JS rather than making it a separate download (to avoid having to deal with the failure case of the JS code loading and the WASM not fetching). All I had to do was import `a.wasm?url` and it did the base64 embedding and loading automatically. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| ▲ | CoderLuii 9 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
this is exactly where i landed too. i build docker images that bundle node tooling and every time i think i understand the build system something changes. require vs import, cjs vs esm, babel vs swc vs esbuild, then half your dependencies use one format and half use the other. the worst part is when you containerize it because now you need it all to work in a clean linux environment with no cached state and suddenly half the assumptions break. | |||||||||||||||||||||||||||||||||||
| ▲ | conartist6 9 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||
Yes, yes to all of that, but there is still hope. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||