Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The more I look into this, the more complex it seems, and the less sure I am with both the way I have things now, as well as whether I like the other options instead. I think I may just stick with TSC for compiling my package code in general, and if anything I can still do/try out the dual-build setup with ESM/CJS, but maybe just use TSC, since I can ensure that things are built consistently. Should I provide synchronous APIs from NBTify? I think learning about how to work with async has really helped me progress, and I don't want to prevent someone else from learning that if I go with providing a sync option to my API. Or rather, if anything, that would only work in Node, because the Compression Streams API is only an asynchronous implementation. I'd have to use Node Zlib as a fallback to allow for a synchronous implementation, and it would be for Node only. I'm not sure I like the splintering of that either. I think I have realized afterall, that I don't specifically want to use ESBuild for building my packages, since it's meant to bundle code, and I think I would only want to use that in a situation of building an ESM bundle for the browser. I may look into that as well though. Maybe I can use pkgbuild for that instead though? It kind of works a bit nicer for plain TS type generation support out of the box, as well as the configuation for things just plain working. Maybe I can look into making my own tool kind of like that, since it feels like all of the tools for this that I find, they all don't quite work exactly like how I want them to, unfortunately. https://www.reddit.com/r/node/comments/14os7zv/the_esmcjs_situation/ https://github.com/wooorm/npm-esm-vs-cjs https://stackoverflow.com/questions/46515764/how-can-i-use-async-await-at-the-top-level https://stackoverflow.com/questions/71517624/because-i-cant-run-await-on-the-top-level-i-have-to-put-it-into-an-async-funct https://commerce.nearform.com/blog/2021/node-esm-and-exports/ https://dev.to/a0viedo/nodejs-typescript-and-esm-it-doesnt-have-to-be-painful-438e https://www.reddit.com/r/node/comments/14rg9ym/esm_not_gaining_traction_in_backend_node/ nodejs/node#49432 https://github.com/azu/tsconfig-to-dual-package https://www.breakp.dev/blog/simple-library-package-setup-with-esbuild/ https://esbuild.github.io/api/#build evanw/esbuild#263 evanw/esbuild#618 microsoft/TypeScript#46005 https://guitar.com/news/music-news/devin-townsend-shredding-dreams-steve-vai/ https://www.reddit.com/r/DevinTownsend/comments/17s332s/devin_and_the_vai_years/ https://www.reddit.com/r/DevinTownsend/comments/k9jot4/devin_townsend_i_was_unable_to_articulate_my/ https://www.kerrang.com/devin-townsend-i-was-unable-to-articulate-my-discontent-so-i-tended-to-act-up-i-even-took-a-sh-t-in-steve-vais-guitar-case https://www.reddit.com/r/DevinTownsend/comments/6tia0r/is_vai_comparing_devin_to_zappa/
- Loading branch information