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
When consuming the 0.2.4 release through webpack 3 using babel-loader, a default module export is generated:
Consuming the 1.1.3 release through the same version of webpack results in no default module export:
This forces an imports change from:
import jstoxml from 'jstoxml';
to
import { toXML } from 'jstoxml';
Looking at the different method of computing module exports in the 1.x release line, it's not immediately clear to me why this is happening. (Maybe I'm just not up on my module semantics.)
Submitting this in case this behavior change wasn't intentional, but mostly as a documentation trail for others.
The text was updated successfully, but these errors were encountered:
Thanks for the heads up! That's weird, it's not entirely clear to me why that's happening either. In 1.x the library is now wrapped in a UMD wrapper (about the first 13 lines at the top), which Webpack may be consuming differently.
When consuming the 0.2.4 release through webpack 3 using babel-loader, a default module export is generated:
Consuming the 1.1.3 release through the same version of webpack results in no default module export:
This forces an imports change from:
to
Looking at the different method of computing module exports in the 1.x release line, it's not immediately clear to me why this is happening. (Maybe I'm just not up on my module semantics.)
Submitting this in case this behavior change wasn't intentional, but mostly as a documentation trail for others.
The text was updated successfully, but these errors were encountered: