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

Upgrade to Babel 7 #5

Open
jfsiii opened this issue Oct 30, 2018 · 3 comments
Open

Upgrade to Babel 7 #5

jfsiii opened this issue Oct 30, 2018 · 3 comments

Comments

@jfsiii
Copy link

jfsiii commented Oct 30, 2018

The dependencies are v6. Support to the latest major version https://babeljs.io/blog/2018/08/27/7.0.0

@acailly
Copy link

acailly commented Nov 28, 2018

I found this issue because I was not able to make jest work with babel 7 and storybook

I thought I would be blocked until this issue was fixed but I was wrong, this plugin already works with babel 7 and my mistake was I was using a .babelrc config file while Jest doc explicitely says that I have to use a babel.config.js file in order to be compatible with babel 7 (https://jestjs.io/docs/en/getting-started.html#using-babel)

So I wrote a babel.config.js file:

module.exports = {
  <content of my .babelrc file>
}

...and deleted the .babelrc file

I also:

  • replaced presets: ['env'] by presets: ['@babel/preset-env'] in my babel config
  • installed babel-core@^7.0.0-bridge.0 and @babel/core in my package.json

And it works!

@amaldare93
Copy link

Someone ported this to a macro that is compatible with babel 7. This allowed me to upgrade my Storybook to v4!

https://github.com/storybooks/require-context.macro

@sibelius
Copy link

sibelius commented May 6, 2019

any progress on this one?

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

Successfully merging a pull request may close this issue.

4 participants