Closed muratgozel closed 3 months ago
Browsers support ESM natively so you can use the module output type
yeah, i didn't mention but there is also private node environments such as google apps script or cloudflare workers which requires you to bundle everything without import or require statements. iife format also works well in those environments.
This tool is a bundler, so it removes import/requires.
Maybe you can spin up a demo where the output does not work for your needs.
yeah, fair enough, better i come with a tangible case. iife exports are generated as part of build phase in my libraries and it was the only missing thing in pkgroll, thats why i wanted to ask. i will see how this goes in the future, thanks anyway.
Feature request
Provide an option for an iife type of bundle.
Motivations
Libraries that target browser environments usually need an iife export to be injectible by html script tag.
Alternatives
The best thing to do right now, is to use rollup to have iife exports.
Additional context
I understand how this bundler works and loved it. I don't want it to be complicated by config files or more more dependencies. Still I'm curious what the developer would think about this.
Contributions