Clear and concise description of the problem
Inside the exports configuration, the options devExports and bin do not play nice: while the exports do have a dual "src in exports"/"dist in publishConfig/exports", this is not the case for the bin, which only has the dist variant directly in the package.json "bin", and nothing in "publishConfig".
For example:
import { defineConfig } from "tsdown";
export default defineConfig({
exports: {
devExports: true,
bin: {
mybin: "./src/run.ts",
},
},
});
will produce in package.json:
"bin": {
"mybin": "./dist/run.js"
}
According to https://pnpm.io/package_json#publishconfig, we can override "bin" in "publishConfig".
Suggested solution
It would be great if "bin" had the same behavior as exports, and would instead produce this:
"bin": {
"mybin": "./src/run.ts"
},
"publishConfig": {
"bin": {
"mybin": "./dist/run.js"
}
}
Cheers!
Alternative
No response
Additional context
No response
Validations
Clear and concise description of the problem
Inside the
exportsconfiguration, the optionsdevExportsandbindo not play nice: while the exports do have a dual "src in exports"/"dist in publishConfig/exports", this is not the case for the bin, which only has the dist variant directly in the package.json "bin", and nothing in "publishConfig".For example:
will produce in package.json:
According to https://pnpm.io/package_json#publishconfig, we can override "bin" in "publishConfig".
Suggested solution
It would be great if "bin" had the same behavior as exports, and would instead produce this:
Cheers!
Alternative
No response
Additional context
No response
Validations