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
feat(babel): rewrite babel-preset-expo to use TypeScript #24328
Conversation
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
// TODO: Remove | ||
[require.resolve('@babel/plugin-proposal-decorators'), { legacy: true }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth making a plan to remove this over time? My understanding is that because developers can specify their own Babel configuration, we don't need to implement a flag to opt back in to adding this plugin as long as we explain the migration path.
[require.resolve('@babel/plugin-proposal-decorators'), { legacy: true }], | ||
platform === 'web' && [require.resolve('babel-plugin-react-native-web')], | ||
isWebpack && platform !== 'web' && [require.resolve('./plugins/disable-ambiguous-requires')], | ||
require.resolve('@babel/plugin-proposal-export-namespace-from'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of scope of this PR but I think Brent mentioned this plugin causes warnings on installation, and there is a new plugin. Makes me think it is worth publishing a minor version upgrade of babel-preset-expo with these fixes, but would need to separate out the breaking changes around webpack.
Why
I found that if we increase the complexity and logic in our babel preset, then we can easily get to 30% faster web builds. Before doing this I'd like to ensure we have a better foundation to build against.
This PR converts babel-preset-expo to TypeScript and drops some safely unused features.
Plans
Test Plan
Tests should keep passing.