Closed hyoban closed 2 months ago
https://github.com/frehner/modern-guide-to-packaging-js-library#set-the-main-field
main should point to a CommonJS-compatible bundle; it should probably match the same file as your package export's require field.
https://github.com/huozhi/bunchee/blob/521c5a9a7ec0c69bcda7afe77e1580b01c118d10/src/prepare.ts#L234-L239
CJS and esm entry are both available, it doesn't have to be a CJS file
https://github.com/frehner/modern-guide-to-packaging-js-library#set-the-main-field
https://github.com/huozhi/bunchee/blob/521c5a9a7ec0c69bcda7afe77e1580b01c118d10/src/prepare.ts#L234-L239