You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd love to be able to use this library directly out of node_modules, but it doesn't work with ES modules.
Ideally it would export native ES Modules, but I'd also be fine with just loading it for side effects. The only problem is that "this" is undefined in ES Modules. Changing the last line from "}(this));" to "}(self));" makes that possible.
The text was updated successfully, but these errors were encountered:
I see. I'm not sure if this is a problem or not and under what circumstances. I also don't want to break anything by messing with module loading, since people interact with this code in different contexts.
What module loader are you using? This works for me:
I'm loading it directly in Chrome. I didn't end up using this library, I don't have the test case around still. But I would expect the following to hit it:
I'd love to be able to use this library directly out of node_modules, but it doesn't work with ES modules.
Ideally it would export native ES Modules, but I'd also be fine with just loading it for side effects. The only problem is that "this" is undefined in ES Modules. Changing the last line from "}(this));" to "}(self));" makes that possible.
The text was updated successfully, but these errors were encountered: