-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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-plugin-lodash #1088
babel-plugin-lodash #1088
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions. |
// plugins.push.apply(plugins, [ | ||
// require.resolve('babel-plugin-transform-react-constant-elements') | ||
// ]); | ||
} |
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 had to move the whole block to provide a function to module.exports
in order to have access to options
object
"presets": [ | ||
["react-app", { "isUsingLodash": false } ] |
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.
Don't know if it's really needed, followed @gaearon specs:
It should be false by default.
@@ -149,7 +154,7 @@ module.exports = { | |||
// @remove-on-eject-begin | |||
query: { | |||
babelrc: false, | |||
presets: [require.resolve('babel-preset-react-app')], | |||
presets: [[require.resolve('babel-preset-react-app'), {isUsingLodash: isUsingLodash}]], |
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 would like to write only { isUsingLodash }
but I'm not sure of which node versions are supported by react-create-app
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Thanks for PR! I changed my mind about
|
Let's hold off with the effort until we see any way to circumvent #1069 (comment). |
Any updates on this feature? |
I think we won't be going ahead with this because #1069 (comment) is kind of a fatal flaw in this approach. |
Linked to #1069
Work is in progress, since the discussion is getting bigger and bigger in the issue I'll wait the go from maintainers to continue and finish 👍
isUsingLodash
option intobabel-preset-react-app
isUsingLodash
if lodash is found in app package.jsonisUsingLodash
option after eject