Closed jsnoble closed 3 weeks ago
List of packages converted to ESM with no CJS exports:
sort-package-json starting from v2
@busma13 you could be referencing this issue in your PRs.
I will from now on.
I think enough of these are updated now that this is good. We're far less blocked on these and we're regularly updated. The few long running exceptions like socket.io have their own issues or will get some.
There are packages that are being published in pure ESM module format (import and export syntax). The problem is that our compiler is not set to handle these types of packages. Most compilers like babel and ours convert code into CJS format (require statements) .
We can change our compiler to export ESM modules instead but it will most likely require us to convert all our js files to use the ESM module format
Things to investigate:
Overall, code that is already written in typescript should be able to easily convert over with a few setting changes to the build logic.
From what I found we need to use typescript v4.7 and higher for this, currently we are using 4.6