Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Fix: update to babel 6 #13

Merged
merged 1 commit into from Dec 11, 2015
Merged

Conversation

hekike
Copy link
Contributor

@hekike hekike commented Dec 10, 2015

The current build on npm is not working with projects with Babel 6.x.

  • update to Babel 6
  • use Object.assign instead of object-assign

@hekike hekike force-pushed the chore/update-babel-6 branch 3 times, most recently from a7ddf4d to 0952db3 Compare December 10, 2015 13:24
@alexkuz
Copy link
Owner

alexkuz commented Dec 10, 2015

babel-runtime should stay in peerDependencies, I guess.

@hekike
Copy link
Contributor Author

hekike commented Dec 10, 2015

@alexkuz why? Actually, I published the current version to our private npm temporary. It's working great.

@alexkuz
Copy link
Owner

alexkuz commented Dec 10, 2015

It's working because you're already having babel-runtime it your project (I suppose). It shouldn't be in dependencies, indeed, but the project is still depending on it, so it's has to be in peerDependencies.

@hekike
Copy link
Contributor Author

hekike commented Dec 10, 2015

@alexkuz I didn't find "official" information about babel-runtime.
However this article is helpful:
http://jamesknelson.com/the-six-things-you-need-to-know-about-babel-6/

So I think it's working because:

The --external-helpers option is now a plugin. To avoid repeated inclusion of Babel’s helper functions, you’ll now need to install and apply the babel-plugin-transform-runtime package, and then require the babel-runtime package within your code (yes, even if you’re using the polyfill).

It's your library, so your decision to do it and apply peerDependency or not.
What do you think?

@alexkuz
Copy link
Owner

alexkuz commented Dec 11, 2015

@hekike oh, I see. As far as I understand, now babel is not externalizing helpers with "optional": "runtime" option, so they are included in lib (that's why it's working in your project). We should use babel-plugin-transform-runtime and add "plugins": ["transform-runtime"] to .babelrc - and again, add babel-runtime into peerDependencies :)

@hekike
Copy link
Contributor Author

hekike commented Dec 11, 2015

@alexkuz done :)

@alexkuz
Copy link
Owner

alexkuz commented Dec 11, 2015

Cool, thanks!

alexkuz added a commit that referenced this pull request Dec 11, 2015
@alexkuz alexkuz merged commit f19062d into alexkuz:master Dec 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants