GIScience / Leaflet.Heightgraph

Leaflet plugin to visualize height information and road attributes.
https://giscience.github.io/Leaflet.Heightgraph
MIT License
100 stars 42 forks source link

Format source bundle as "iife" #109

Open nrenner opened 3 years ago

nrenner commented 3 years ago

Fixes #107.

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.