`"main": false` field is incorrectly removed from package.json
petersalas opened this issue · 0 comments
petersalas commented
In exports.ts
, the following:
const mod = resolveExport(pkg.exports['.'], ['require'])
const main = c?.main ?? !!mod
if (main) {
/* [snip] */
} else {
if (c) delete c.main
/* [snip] */
}
neglects that main
might be false
due to c?.main
being false even when a .
export is defined.
The effect is that it's not possible to durably set "main": false
when a .
export is defined.