rollup-plugin-esbuild icon indicating copy to clipboard operation
rollup-plugin-esbuild copied to clipboard

Enums not being inlined

Open panoply opened this issue 2 years ago • 4 comments

ESBuild supports inlining const enums as per https://github.com/evanw/esbuild/issues/128 but plugin does not.

panoply avatar Apr 16 '22 12:04 panoply

@egoist bumping this, it is really important for us.

panoply avatar Jun 10 '22 14:06 panoply

This is the reason it's not supported https://github.com/evanw/esbuild/issues/128#issuecomment-999946969

egoist avatar Jun 10 '22 14:06 egoist

💔

Will leave this open for now and I will do some investigating and see if it is possible to achieve by some other means.

panoply avatar Jun 10 '22 14:06 panoply

Just find this issue after making a reproduction to locate the issue, just paste my reproduction here if anyone needs this: https://stackblitz.com/edit/rollup-esbuild-ts-enum-bug?file=test.ts

Any idea how we can bypass this? I am on big project while some part of my files are using const enum to provide better reading with source code. But currently this behavior is slowing down runtime by size and extra calculation.

Mister-Hope avatar May 30 '23 06:05 Mister-Hope