-
Notifications
You must be signed in to change notification settings - Fork 5
Support of babel 6 and babel 7 #14
Comments
Hey @neutrinojs we'd really love to use this package over at storybook, do you think if @igor-dv made a PR you'd accept it? |
Hi! Thank you for reaching out :-) In the Storybook PR, I see references to Babel 7 specific package names, eg: It seems like even with the proposed changes here, that won't work under Babel 6?
Do you mean deps instead of peerDeps? ie: Users of babel-merge would need to follow the documentation since there will no no dep or peeDep on babel core? If so, perhaps I think there is a way for babel-merge to be able to have a peerDep on babel core - using the bridge package: Babel 7 has so many improvements, it seems like encouraging users to upgrade to it would be worth the effort long-term. There's a Babel package for assisting with migration that to which users could be directed? However @eliperelman has more of a stake in the direction of this package than I, so will probably have more thoughts :-) |
Hmm actually thinking about this, I believe that babel-merge should never have had a dependency on |
it's true, but people that still use babel 6, can just use their
Yeah 😅
It's actually a nice idea. peerDependencies: {
"babel-core": "6.x || ^7.0.0-bridge.0"
} Again, there will be a need to install the bridge even if you are using babel@7. Also, we will need to have a peer on |
Sounds awesome @edmorley |
I'm totally fine going the bridge peerDep route. Worst case scenario, we can backport some of the merge changes from 3.x into 2.x which works on Babel 6. |
Hey,
I would like to use this package in Storybook. In my PR here, I've temporarily copied the code in order to make a progress.
The problem is that Sotrybook has a peer of
bable-loader
in order to allow people still to use babel 6.That means, we can't be dependant on a package that is directly dependant on
@babel/core
.So I've created a
babel-core-proxy
that does something like this:And then used it in the
babel-merge
code:Will you consider this change as a pull request ?
The downside of this approach is that
babel-core
and@babel/core
can't be in a list of peerDeps, but it's something that can be documented 🤷♂️Thanks.
The text was updated successfully, but these errors were encountered: