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

Babel 7 #3746

Merged
merged 84 commits into from Aug 23, 2018
Merged

Babel 7 #3746

merged 84 commits into from Aug 23, 2018

Conversation

Hypnosphi
Copy link
Member

@Hypnosphi Hypnosphi commented Jun 10, 2018

Probably needs delaying: #3746 (comment)

DISCLAIMER: this is about moving Storybook build process itself to Babel 7, and making it the default. You should be able to use Babel 7 in your app with current stable version of Storybook, you just need to install babel-bridge

Issue: #3335

This doesn't yet fix all the issues linked from there but it performs the necessary breaking change so that rest of the work could be done in a minor release

@vicapow
Copy link

vicapow commented Jun 15, 2018

Woo!! Can't wait for this to land. Anything we can do to help?

@Hypnosphi
Copy link
Member Author

Thanks @vicapow, I hope to be able to finish this in upcoming days

@ndelangen
Copy link
Member

LGTM @igor-dv

@ndelangen ndelangen merged commit 562794e into master Aug 23, 2018
@ndelangen ndelangen deleted the babel-7 branch August 23, 2018 16:00
@igor-dv igor-dv mentioned this pull request Aug 23, 2018
@igor-dv
Copy link
Member

igor-dv commented Aug 23, 2018

Done - #4062

@sebinsua
Copy link

Will you publish a new alpha version containing this?

@ndelangen
Copy link
Member

@shilman shall we release an alpha version today?

@shilman
Copy link
Member

shilman commented Aug 24, 2018

@chawax
Copy link

chawax commented Aug 28, 2018

I tried this release to make Storybook work with React Native 0.56.0 but I always have a message about unallowed presets. Is there something to change in our project ? A working example somewhere ?

The error message I have when starting Storybook :

ERROR in ./storybook/addons.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/administrateur/xxx/xxx-app/node_modules/babel-preset-react/lib/index.js
    at createDescriptor (/Users/administrateur/xxx/xxx-app/node_modules/@babel/core/lib/config/config-descriptors.js:178:11)
    at items.map (/Users/administrateur/xxx/xxx-app/node_modules/@babel/core/lib/config/config-descriptors.js:109:50)
    at Array.map (<anonymous>)
    at createDescriptors (/Users/administrateur/xxx/xxx-app/node_modules/@babel/core/lib/config/config-descriptors.js:109:29)
    at createPresetDescriptors (/Users/administrateur/xxx/xxx-app/node_modules/@babel/core/lib/config/config-descriptors.js:101:10)
    at passPerPreset (/Users/administrateur/xxx/xxx-app/node_modules/@babel/core/lib/config/config-descriptors.js:58:96)
    at cachedFunction (/Users/administrateur/xxx/xxx-app/node_modules/@babel/core/lib/config/caching.js:33:19)
    at presets.presets (/Users/administrateur/xxx/xxx-app/node_modules/@babel/core/lib/config/config-descriptors.js:29:30)
    at mergeChainOpts (/Users/administrateur/xxx/xxx-app/node_modules/@babel/core/lib/config/config-chain.js:315:26)
    at /Users/administrateur/xxx/xxx-app/node_modules/@babel/core/lib/config/config-chain.js:278:7
 @ multi ./storybook/addons.js ./node_modules/@storybook/react-native/dist/manager/index.js manager[0]

@Hypnosphi
Copy link
Member Author

We didn't migrate React Native part yet

@chawax
Copy link

chawax commented Aug 28, 2018

OK, thanks for your response. Any idea when it will be migrated ?

@Hypnosphi
Copy link
Member Author

Hypnosphi commented Aug 28, 2018

Definitely not before Expo and Create React Native App both support RN 0.56 with Babel 7

@chrisnojima
Copy link

fyi RN 0.57 (in rc) supports babel 7

@Hypnosphi
Copy link
Member Author

Hypnosphi commented Aug 28, 2018

@chrisnojima 0.56 does as well. But Create React Native App and Expo don't

@chawax
Copy link

chawax commented Aug 29, 2018

@Hypnosphi I can't see any plan for that in issues of Create React Native App. Do you have informations about that ? Or do you know a workaround for this ? Our project doesn't use Create React Native App / Expo and Storybook is our last step to migrate to RN 0.56. Really a problem for us :(

@Hypnosphi
Copy link
Member Author

@Gongreg any ideas?

@chawax
Copy link

chawax commented Sep 5, 2018

I just saw migrating to RN 0.56.0 is not a priority for Expo team : https://blog.expo.io/expo-sdk-v29-0-0-is-now-available-f001d77fadf

Absolutely no chance to see Storybook React Native migrating to Babel 7 before CRNA and Expo do it ?

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

Successfully merging this pull request may close these issues.

None yet