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

Migrate to babel@7.0.0-beta #3335

Closed
2 tasks done
Hypnosphi opened this issue Apr 1, 2018 · 4 comments
Closed
2 tasks done

Migrate to babel@7.0.0-beta #3335

Hypnosphi opened this issue Apr 1, 2018 · 4 comments

Comments

@Hypnosphi
Copy link
Member

Hypnosphi commented Apr 1, 2018

Work summary

Who to contact

Me

@stale
Copy link

stale bot commented Apr 22, 2018

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Apr 22, 2018
@Hypnosphi Hypnosphi added the todo label Apr 22, 2018
@stale stale bot removed the inactive label Apr 22, 2018
@osdevisnot
Copy link

It seems this is needed for CRA and getstorybook integration when react-scripts@2.0 is ready (referenced in facebook/create-react-app#3815). Currently, we run into incompatible versions for babel since react-scripts@2.0 is on Babel 7 and Storybook is on Babel 6.

@Hypnosphi
Copy link
Member Author

You may try just adding your own babel-loader@8 in your custom webpack config (at least that worked for my own app)

@Hypnosphi Hypnosphi added this to the v4.0.0 milestone May 27, 2018
@Hypnosphi
Copy link
Member Author

move @babel/core to direct dependencies again

Ok looks like we can't do that. Actually we must declare all the peer dependencies of the server-side packages we use as our own. Imagine the following situation:

— We depend on A@2 which has a peer dependency on B@3
— We add a direct dependency on B@3 to satisfy that
— User app has a direct dependency on B@2 and doesn't have any dependency on A
npm hoists A@2 to root node_modules, but leaves B@3 under @storybook/*/node_modules to avoid clashing with B@2
— inside A@2, import 'B' resolves to B@2 instead of the expected B@3, which leads to an error

webpack's resolve.alias can solve this issue for client-side dependencies but not for server-side ones

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

2 participants