-
Notifications
You must be signed in to change notification settings - Fork 638
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
Conversation
`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.
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.
I'm not a fan of this API but that's not a reason to push back. Thanks for sending the PR!
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.
@cpojer has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary
name
is set tobabel-loader
in Webpack but certain tools use custom babel loaders which makes thename
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 unusedreact-native-web
code.We'd like to move away from using
babel-loader
in favor of using this newbundler
property so more free form configurations like "Metro + react-native-web" can be easily configurable expo/expo#8170