-
-
Notifications
You must be signed in to change notification settings - Fork 144
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Clear and concise description of the problem
Description
Currently, tsdown generates the exports field in package.json without a strictly defined order. According to Node.js documentation and best practices (Dual Package Hazard prevention), the order of keys in the exports object is significant because Node.js uses the first matching condition.
Proposed Change
Ensure that the generated exports object follows the recommended order:
typesimportrequiredefault
Example of desired output:
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./package.json": "./package.json"
},Current behavior

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request