Closed ctjlewis closed 2 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/formium/tsdx/DXDgToBbfGTFxbr7udnDDoQNXziL
✅ Preview: https://tsdx-git-fork-ctjlewis-no-dist-formium.vercel.app
Ha, totally forgot I sent this in! @jaredpalmer I ended up forking this and doing a lot more, see:
https://github.com/tszip/tszip
I also ended up starting fresh again, building on work done by Luke Edwards (what I currently use, basically state of the art):
https://github.com/tsmodule/tsmodule
Would draw special attention to the "Next.js component library" section of that README. The config mentioned there is now generated automatically by tsmodule create --react [project-name]
, just need to update docs.
We should talk sometime if you have a minute.
Is there any rough idea when this will be released?
@cdauth I'm trying to see what can be done but this repo is mostly not maintained as many people have moved onto other work. I would use tsmodule above even though it's basically experimental, feel free to open an issue if you have any problems.
See also: #1134, #1129.
Changes
Full ESM-CJS interop:
.cjs
/.mjs
extensions,"module"
/"main"
fields,"exports"
field. Ex:build --legacy
flag--passWithNoTests
to Jest by default withtsdx test
Reasoning
ESNext output and ESM/CJS interop changes leave all transpilation to lower featuresets up to library consumers downstream in order to minimize problems at compile-time, and prevent TSDX from enforcing a maximum featureset on consumers (previously, this was ES5).
Inspired by module resolution issues with React Native's Metro importing TSDX modules. Also results in much smaller bundles, especially now that ESM is Terser'd by default.