Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish modern ESNext/ES2022 code #86

Open
arv opened this issue Jan 5, 2023 · 2 comments
Open

Publish modern ESNext/ES2022 code #86

arv opened this issue Jan 5, 2023 · 2 comments

Comments

@arv
Copy link

arv commented Jan 5, 2023

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
Copy link
Owner

hoeck commented Jan 5, 2023

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
Copy link
Author

arv commented Jan 5, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants