t4t5 / sweetalert

A beautiful replacement for JavaScript's "alert"
https://sweetalert.js.org
MIT License
22.39k stars 2.84k forks source link

Proposal: Don't expose SweetAlert to global #891

Closed lourenci closed 5 years ago

lourenci commented 5 years ago

Remove the SweetAlert from global would allow me to work with more than one SweetAlert version in my project.

My case: I'm migrating an angular app to React. My angular app is using the angular-sweetalert pkg with a out-of-date sweetalert. If the SweetAlert had not exposed itself to global, I could keep working on in new features with a up-to-date version of the SweetAlert.

What are the trade-offs for this proposal?

IgorCode commented 5 years ago

And where do you propose it should go if not in global and how would we access it? Doesn't make sense to me.

lourenci commented 5 years ago

Sorry, I forgot that not everybody works with es6 modules ou bundles. I'll close this issue.