dom-confetti
dom-confetti copied to clipboard
Support direct embed into HTML
I noticed that this library is set up to support a commonJS interface (like Node and Webpack). It would be great if it also supported being direct embedded into HTML. Currently, attempting that results in errors like: Uncaught ReferenceError: exports is not defined
We could use something like returnExports
from UMD which lets a module work with Node (CommonJS), AMD (e.g. RequireJS) and browser globals. Or we could simplify it by not supporting AMD.
Love this library and how simple it is!
Oh! It looks like you already have a babel plugin for doing this in your dev
task. We just need to add it to your build
task to ensure it gets in the production build. I can do a PR for that.