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 noticed this while I was trying to import danfojs via the https://jspm.dev cdn.
Right now the distributed script of danfos expects itself to be executed globally.
That is all fine and dandy as long as you either include the script tag directly into the dom or load the script manually in the browser. However it kind of causes problems when you want to use danfojs in the context of an ES-Module based build system.
Since every declared variable inside a ES-Module is local to that module, the dfd var is not exposed and can also not be accessed via the global window (since danfojs is run in its own context).
Is it possible to add an additional target in the webpack bundle that provides an esm conform export of the dfd variable?
I think that should do the job.
Thank you for the hard work!
The text was updated successfully, but these errors were encountered:
merryman
changed the title
Feature Request: User CommonJS conform population of global namespace
Feature Request: provide ESM conform dist target
Oct 19, 2020
@merryman Thanks for pointing this out. I'll look into it. Meanwhile, if you have any pointers, or fix for it please don't hesitate to add it.
Webpack config can be a pain most times 😄
I noticed this while I was trying to import danfojs via the https://jspm.dev cdn.
Right now the distributed script of danfos expects itself to be executed globally.
That is all fine and dandy as long as you either include the script tag directly into the dom or load the script manually in the browser. However it kind of causes problems when you want to use danfojs in the context of an ES-Module based build system.
Since every declared variable inside a ES-Module is local to that module, the dfd var is not exposed and can also not be accessed via the global window (since danfojs is run in its own context).
Is it possible to add an additional target in the webpack bundle that provides an esm conform export of the dfd variable?
I think that should do the job.
Thank you for the hard work!
The text was updated successfully, but these errors were encountered: