Closed jcbhmr closed 7 months ago
There's an open issue on typescript github to support changing file extensions at tsc buildtime. That hasn't been encouraged since it's mostly used to cause the not-so-great dual package hazard. Instead TS team seems to recommend that you just build an ESM or CJS and then wrap it in another .mjs or .cjs file as a facade for the other module system. https://github.com/microsoft/TypeScript/issues/49462
I used a tricksy hack to make the cjs folder treat .js as .cjs by putting a {"type":"commonjs"}
package.json in there 😆
@mesqueeb This is the next PR that I think should be tackled 😊
closing in favour of https://github.com/mesqueeb/is-what/pull/87
This PR would...
This is intended to be a non-breaking migration from rollup to tsc. Later #55 can be considered with the move to ESM-only
THIS DOES NOT SOLVE THE DUAL PACKAGE HAZARD ISSUE!