As we all know, build systems are hard. Ours has gotten a bit convoluted with the introduction of challenges and mastery, and has some really slow and messy spots that can be improved upon. Here are some of the things I want to improve upon:
[X] The dev server takes ~10 seconds to start the dev server on my M1 Mac - that's pretty slow. I've done some profiling, and the Brotli (de)compression of our contracts takes a super long time. We should switch this to messagepack instead.
[ ] We shouldn't do the work twice. We can use things like turborepo to cache and only do things once.
[ ] Rework the static folder and config handling - 8mb in 1 chunk is too much.
[ ] We should switch esbuild to output esm instead of commonjs, that way we can distribute multiple tiny chunks.
As we all know, build systems are hard. Ours has gotten a bit convoluted with the introduction of challenges and mastery, and has some really slow and messy spots that can be improved upon. Here are some of the things I want to improve upon:
static
folder and config handling - 8mb in 1 chunk is too much.