Describe the bug
src/demo.ts
const enum Prop {
Display = 1,
Isolation,
Position,
}
console.log(Prop.Display)
tsdown@^0.9.8
tsdown.config.ts
import { defineConfig } from 'tsdown'
export default defineConfig({
entry: ['./src/demo.ts'],
outDir: 'dist',
format: 'esm',
target: 'node16',
clean: true,
dts: true,
minify: true,
noExternal: ['es-toolkit'],
})

Reproduction
see the GIF
System Info
System:
OS: macOS 15.4.1
CPU: (10) arm64 Apple M2 Pro
Memory: 99.69 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0 - ~/.local/state/fnm_multishells/86831_1745648882839/bin/node
Yarn: 1.22.22 - ~/Library/pnpm/yarn
npm: 10.9.2 - ~/.local/state/fnm_multishells/86831_1745648882839/bin/npm
pnpm: 10.8.0 - ~/Library/pnpm/pnpm
bun: 1.2.10 - /opt/homebrew/bin/bun
Browsers:
Brave Browser: 133.1.75.180
Chrome: 135.0.7049.115
Edge: 135.0.3179.98
Safari: 18.4
Used Package Manager
pnpm
Validations
Describe the bug
src/demo.ts
tsdown@^0.9.8
tsdown.config.ts
Reproduction
see the GIF
System Info
System: OS: macOS 15.4.1 CPU: (10) arm64 Apple M2 Pro Memory: 99.69 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.14.0 - ~/.local/state/fnm_multishells/86831_1745648882839/bin/node Yarn: 1.22.22 - ~/Library/pnpm/yarn npm: 10.9.2 - ~/.local/state/fnm_multishells/86831_1745648882839/bin/npm pnpm: 10.8.0 - ~/Library/pnpm/pnpm bun: 1.2.10 - /opt/homebrew/bin/bun Browsers: Brave Browser: 133.1.75.180 Chrome: 135.0.7049.115 Edge: 135.0.3179.98 Safari: 18.4Used Package Manager
pnpm
Validations