jankapunkt / npm-package-template

:package: minimal NPM package template using Babel, Mocha, Chai, C8, Standardjs, JSDoc and Rollup.
https://jankapunkt.github.io/npm-package-template/
MIT License
17 stars 8 forks source link

Question on build targets #57

Open dhowe opened 1 year ago

dhowe commented 1 year ago

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 ?