nrkno / core-components

Accessible and lightweight Javascript components
https://static.nrk.no/core-components/latest/
MIT License
117 stars 10 forks source link

Issue with core-toggle script hosted on static #632

Closed AndersCan closed 5 months ago

AndersCan commented 3 years ago

core-toggle is built as a UMD bundle and that causes the footer in rollup.build.js to fail for webpages that use RequireJs.

image

Not sure what a good solution is, but I personally think this should just be a built as a iife that does customElements.register(coreToggle)

Script from image ```js var s = document.createElement('script') s.src = 'https://static.nrk.no/core-components/major/7/core-toggle/core-toggle.min.js' document.head.appendChild(s) ```