manzt / numcodecs.js

Buffer compression and transformation codecs
MIT License
29 stars 6 forks source link

Move __toBinary() to build rather than src, replace rollup/ts with esbuild #30

Closed manzt closed 3 years ago

kylebarron commented 3 years ago

How much faster is esbuild for you?

manzt commented 3 years ago

I'd like to move to esbuild all together because it's noticeably faster, and the custom base64 plugin emulates the behavior/is copied from esbuild's binary loader already. The tests for numcodecs.js require building from src before running, and with esbuild it's ms.

The main issue is that chunks aren't desirable in the esbuild-only build (https://github.com/evanw/esbuild/issues/492) currently. I think if/when manualChunks in esbuild, I'll be able to remove rollup and all rollup plugins. This PR sets the foundation for that future, since all the esbuild-like behavior is now a part of the hybrid rollup build and can easily be swapped out.