Changing the Rollup output format for the source bundle from cjs (CommonJS) to iife (IIFE: Immediately-Invoked Function Expression) fixes directly using the source bundle with a script tag and our usage in brouter-web (concatenating source bundles).
Don't know if there was a specific reason to use cjs for the source bundle, while the minified bundle already uses the iife format. @TheGreatRefrigerator?
I don't have a setup to test all the module loaders and bundlers, but there is still the module wrapper that supports both AMD and CommonJS using globals, so I don't see how this change could break anything.
Fixes #107.
Changing the Rollup output format for the source bundle from
cjs
(CommonJS) toiife
(IIFE: Immediately-Invoked Function Expression) fixes directly using the source bundle with ascript
tag and our usage in brouter-web (concatenating source bundles).Don't know if there was a specific reason to use
cjs
for the source bundle, while the minified bundle already uses theiife
format. @TheGreatRefrigerator?I don't have a setup to test all the module loaders and bundlers, but there is still the module wrapper that supports both AMD and CommonJS using globals, so I don't see how this change could break anything.