npm-package-template
npm-package-template copied to clipboard
Question on build targets
Greetings and thanks for the template. This is just a question re: the target build formats. I notice that there are 4 targets in the rollup-config: es, es5, iife, and cjs. And in package.json I see the three outputs: "main": "dist/index.cjs.js", "browser": "dist/index.iife.js", "exports": "./dist/index.js"
I'm guessing cjs for npm/node and iife for the browser. Where do you imagine that the two es formats would be used/published ?
Hey @dhowe big apologies, I somehow did not see this issue being opened. I will have to review and redo the exports since the last time I worked on this I had a much less understanding of the different output environments.
My goal is to provide multiple outputs to support the following with each different outputs:
- modern browsers
- legacy browsers
- modern node
- legacy node
- bun
- deno
I'd like to avoid multi target outputs such as UMD but rather do specific builds for each target