Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking change between 0.2.4 and 1.1.3 #31

Closed
ZebraFlesh opened this issue Oct 28, 2017 · 2 comments
Closed

Breaking change between 0.2.4 and 1.1.3 #31

ZebraFlesh opened this issue Oct 28, 2017 · 2 comments
Labels

Comments

@ZebraFlesh
Copy link

When consuming the 0.2.4 release through webpack 3 using babel-loader, a default module export is generated:
screen shot 2017-10-28 at 1 19 52 pm

Consuming the 1.1.3 release through the same version of webpack results in no default module export:
screen shot 2017-10-28 at 1 23 27 pm

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.

@davidcalhoun
Copy link
Owner

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.

@davidcalhoun
Copy link
Owner

Thanks again for the heads up. This is now fixed in 1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants