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

Added bundler property to babel caller #558

Closed
wants to merge 2 commits into from
Closed

Added bundler property to babel caller #558

wants to merge 2 commits into from

Conversation

EvanBacon
Copy link
Contributor

Summary

name is set to babel-loader in Webpack but certain tools use custom babel loaders which makes the name field an unpredictable property for detecting what bundler is being used.

Adding a bundler property to every loader will help make this more distinguishable.

Expo currently does this in the @expo/webpack-config (here) as a way of configuring the babel preset to tree-shake unused react-native-web code.

We'd like to move away from using babel-loader in favor of using this new bundler property so more free form configurations like "Metro + react-native-web" can be easily configurable expo/expo#8170

EvanBacon added 2 commits May 6, 2020 14:31
`name` is used in Webpack for `babel-loader` but certain tools use custom babel loaders which makes the `name` field an unpredictable way for detecting what bundler is being used. Adding a bundler property to every loader will help make this more distinguishable.
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 6, 2020
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of this API but that's not a reason to push back. Thanks for sending the PR!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@cpojer merged this pull request in cd8c834.

This was referenced May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants