-
-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
After build there is a warning log:
Generated an empty chunk: "types.d".The export in the type definition file is empty:
// /dist/types.d.mts
export { }Notes
- seems that
types.d.tsis ignored by pkgroll - same behaviour changing package.json:
-
{ "types": "./dist/types.d.ts" "exports": { "types": "./dist/types.d.ts" } } -
{ "types": "./dist/index.d.ts" "exports": { "types": "./dist/index.d.ts" } } -
{ "types": "./dist/index.d.mts" "exports": { "types": "./dist/index.d.mts" } }
-
- PnP (Plug'n'Play) is enabled with Yarn Berry (should not be relevant)
is generated without type definition file (as default, maybe should be generated atypes.d.tsif export(s) isindex.jsortypes.d.mtsif export(s) isindex.mjs)
Expected behavior
/dist/types.d.mts file contains related type definition:
declare function getValue(value: StringOrNumber): StringOrNumber;
export { getValue };Minimal reproduction URL
https://github.com/rtritto/test-pkgroll/tree/bug-type-definition
Version
2.5.0
Node.js version
22.9.0
Package manager
yarn
Operating system
Windows
Bugs are expected to be fixed by those affected by it
- I'm interested in working on this issue
Compensating engineering work financially will speed up resolution
- I'm willing to offer financial support
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working