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

0.1.11 will not work with babel anymore #9

Closed
BowlingX opened this issue Oct 25, 2017 · 5 comments
Closed

0.1.11 will not work with babel anymore #9

BowlingX opened this issue Oct 25, 2017 · 5 comments

Comments

@BowlingX
Copy link

BowlingX commented Oct 25, 2017

Hi :)
thank you first for the library.
0.1.11 introduces a breaking change (but is a patch release) and removes all babel compiler hints / .babelrc file. It's not usable in a out of the box babel/webpack configuration anymore.

Is there any migration path?

david

@lukasbuenger
Copy link
Owner

lukasbuenger commented Oct 27, 2017

Hi David,

I have to admit that the versioning of this release is not very informative in regards to semver. Sorry for that.

I removed babel because it was a constant source of bugs and inconveniences across environments. Should I include the regenerator runtime in order to provide out of the box compatibility? If yes, what happens in an environment where generators are already supported (see #8 and #1 )? default export vs module.exports was another thing (see #6). And so on and so forth.

So in the end I decided to make this a node module in the actual sense of the word and treat transpilation as out of scope.

As far as migration paths go you'll have to treat this package like any other node-only package that you want to transpile for e.g. use in browser.
babel-register and Webpack loader configs should help.
And some more info in the README would certainly help.

@singingwolfboy
Copy link

@BowlingX I ran into an issue with this library not working properly with Babel, as well. My problem was that I was trying to use UglifyJS with webpack to compress my build, and UglifyJS only works with ES5. I discovered that I could solve the problem neatly by upgrading to the standalone uglifyjs-webpack-plugin, which uses a fork of UglifyJS that works with ES6. Once I did that, I had no further problems with this library at all.

Does that help you out?

@lukasbuenger lukasbuenger removed the docs label Oct 27, 2017
@lukasbuenger
Copy link
Owner

I just had lunch with a co-worker of mine and he suggested to generally get rid of the es6 features as there are very few anyway, so that no special config/treatment is needed when transpiling. The most important change will probably be switching from generators to loops when iterating over nodes. The downside of that will be that instead of being somewhat O(n)-ish, iterating over nodes is going to be straight O(n).
I hope I can get this done by monday.

@lukasbuenger
Copy link
Owner

@BowlingX
Does v1.0.0 work as expected with your webpack config now?

@BowlingX
Copy link
Author

@singingwolfboy yeah :) this was the issue. @lukasbuenger thank you a lot for publishing the new version, I think I will close the issue for now.

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

No branches or pull requests

3 participants