egoist / tsup

The simplest and fastest way to bundle your TypeScript libraries.
https://tsup.egoist.dev
MIT License
8.92k stars 213 forks source link

TypeScript enums not properly inlined #820

Open mgcrea opened 1 year ago

mgcrea commented 1 year ago

Currently running a fairly simple build script from one of my package, basically:

tsup --entry src/index.ts --format cjs,esm --no-splitting --sourcemap --dts --clean --entry src/bin/cli.ts

Unfortunately it does not properly inline the following enum: https://github.com/mgcrea/pino-pretty-compact/blob/v1.1.2/src/prettifier.ts#L56

It's currently manually inlined (for release) but just replace the number with the enum to test and rebuild.

Tried to remove all CLI options, but no more luck, it does not inline the enum (tsc works).

Any idea?

Upvote & Fund

Fund with Polar

almarzn commented 3 months ago

Same issue here. enum is not working.

val-MattRobinson commented 1 month ago

Still seems to be an issue, is there any updates on this?