Skip to content

Turn on Babel helpers #5093

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

Merged
merged 14 commits into from
Sep 25, 2018
Prev Previous commit
Next Next commit
Turn off helpers by default in /prod, /dev, /test
  • Loading branch information
Timer committed Sep 25, 2018
commit 8ef839d9d14014eee4da7ea03b104bc579569ff9
2 changes: 1 addition & 1 deletion packages/babel-preset-react-app/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
const create = require('./create');

module.exports = function(api, opts) {
return create(api, opts, 'development');
return create(api, { helpers: false, ...(opts || {}) }, 'development');
Copy link
Contributor

Choose a reason for hiding this comment

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

It's fine to spread undefined. I don't think you need || {}

Copy link
Contributor

Choose a reason for hiding this comment

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

This is object spread though. Is it supported in all envs we target?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

look at that. they thought of everything.

};
2 changes: 1 addition & 1 deletion packages/babel-preset-react-app/prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
const create = require('./create');

module.exports = function(api, opts) {
return create(api, opts, 'production');
return create(api, { helpers: false, ...(opts || {}) }, 'production');
};
2 changes: 1 addition & 1 deletion packages/babel-preset-react-app/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
const create = require('./create');

module.exports = function(api, opts) {
return create(api, opts, 'test');
return create(api, { helpers: false, ...(opts || {}) }, 'test');
};