Open SplinterStan opened 1 month ago
I'm probably facing the same issue. There is the repro: https://github.com/repobuddy/storybook-image-snapshot
branch: rollup-dts
npm i
npm build
> tsup
CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v8.3.0
CLI Using tsup config: /home/unional/code/repobuddy/sis/tsup.config.ts
CLI Target: chrome100,safari15,firefox91,node18
CLI Cleaning output folder
ESM Build start
Generated an empty chunk: "index".
ESM dist/index.js 68.00 B
ESM dist/index.js.map 69.00 B
ESM ⚡️ Build success in 19ms
DTS Build start
node_modules/rollup/dist/rollup.d.ts (9:0): "Decorator" is not exported by "node_modules/@types/estree/index.d.ts", imported by "node_modules/rollup/dist/rollup.d.ts".
Error: error occured in dts build
at Worker.<anonymous> (/home/unional/code/repobuddy/sis/node_modules/tsup/dist/index.js:1543:26)
at Worker.emit (node:events:514:28)
at MessagePort.<anonymous> (node:internal/worker:263:53)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:814:20)
at exports.emitMessage (node:internal/per_context/messageport:23:28)
DTS Build error
Maybe related to #1231
Problem
declare module ...
) results in an error.Version info
Repro
Create a new package called
tsup-augmented-module
vianpm init
and put insideindex.d.ts
module augmentation, e.g.:}
"dependencies": { "tsup-augmented-module": "file:../tsup-augmented-module", }
import { SetupOptions } from 'tsup-augmented-module';
export function test(options: SetupOptions): string { return 'test accomplished!'; }
RollupError: "SetupOptions" is not exported by 'tsup-augmented-module', imported by "./index.ts".