hoeck / simple-runtypes

Small, efficient and extendable runtype library for Typescript
MIT License
111 stars 5 forks source link

Publish modern ESNext/ES2022 code #86

Open arv opened 1 year ago

arv commented 1 year ago

Right now the code is compiled to ES5 which is a lot more verbose than needed.

Can the esm.js file at least be compiled to ES6 if not esnext?

hoeck commented 1 year ago

Of course! Atm. the build and packaging is completely done with tsdx but that has not seen an update in years.

Any suggestions on how to replace tsdx with something maintained and more modern? I'd prefer not to build everything by hand. Or could you point me to an existing repo that builds and publishes a TS library in all required formats?

arv commented 1 year ago

I've used esbuild for most of my needs in the past but it does not support generating .d.ts files.

vite has plugins for .d.ts files and that looks promising to me but under the hood it just uses rollup + tsc for the bundled .d.ts so you might as well simply use tsc directly to generate the .d.ts files