simplajs / simpla-demo-helper

Sets up a demo environment for Simpla element demos
https://www.simplajs.org
MIT License
3 stars 0 forks source link

Polluting global namespace #1

Open bedeoverend opened 7 years ago

bedeoverend commented 7 years ago

Looks like rollup isn't packaging the module into an IIFE so all the top level variables are being put onto window. Could be as simple as changing rollup config in gulp file to specify type as IIFE?

madeleineostoja commented 7 years ago

Probably makes more sense to just grab Simpla from unpkg, or link it in in a script tag? Then don't need any bundling at all.

bedeoverend commented 7 years ago

I'd go with unpkg, given that's our current trend. Also it means that you're getting the latest Simpla, rather than relying on simpla-demo-helper having been packaged with the latest Simpla. Though you'll still end up polluting with the variables declared inside the helper script?