is-what icon indicating copy to clipboard operation
is-what copied to clipboard

Use `tsc`

Open jcbhmr opened this issue 2 years ago • 3 comments

This PR would...

  • [x] Not solve the #37
  • [x] Keep CJS and ESM builds
  • [x] Remove rollup
  • [x] Use tsc!

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!

jcbhmr avatar Jun 03 '23 23:06 jcbhmr

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

jcbhmr avatar Jun 05 '23 17:06 jcbhmr

I used a tricksy hack to make the cjs folder treat .js as .cjs by putting a {"type":"commonjs"} package.json in there 😆

jcbhmr avatar Jun 05 '23 17:06 jcbhmr

@mesqueeb This is the next PR that I think should be tackled 😊

jcbhmr avatar Jun 06 '23 21:06 jcbhmr

closing in favour of https://github.com/mesqueeb/is-what/pull/87

mesqueeb avatar May 02 '24 16:05 mesqueeb