Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions packages/babel-preset-react-app/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,30 +148,30 @@ module.exports = function (api, opts, env) {
// See discussion in https://github.com/facebook/create-react-app/issues/4263
// Note:
// 'loose' mode configuration must be the same for
// * @babel/plugin-proposal-class-properties
// * @babel/plugin-proposal-private-methods
// * @babel/plugin-proposal-private-property-in-object
// * @babel/plugin-transform-class-properties
// * @babel/plugin-transform-private-methods
// * @babel/plugin-transform-private-property-in-object
// (when they are enabled)
[
require('@babel/plugin-proposal-class-properties').default,
require('@babel/plugin-transform-class-properties').default,
{
loose: true,
},
],
[
require('@babel/plugin-proposal-private-methods').default,
require('@babel/plugin-transform-private-methods').default,
{
loose: true,
},
],
[
require('@babel/plugin-proposal-private-property-in-object').default,
require('@babel/plugin-transform-private-property-in-object').default,
{
loose: true,
},
],
// Adds Numeric Separators
require('@babel/plugin-proposal-numeric-separator').default,
require('@babel/plugin-transform-numeric-separator').default,
// Polyfills the runtime needed for async/await, generators, and friends
// https://babeljs.io/docs/en/babel-plugin-transform-runtime
[
Expand Down Expand Up @@ -205,8 +205,8 @@ module.exports = function (api, opts, env) {
// but not yet supported in webpack due to support missing from acorn.
// These can be removed once webpack has support.
// See https://github.com/facebook/create-react-app/issues/8445#issuecomment-588512250
require('@babel/plugin-proposal-optional-chaining').default,
require('@babel/plugin-proposal-nullish-coalescing-operator').default,
require('@babel/plugin-transform-optional-chaining').default,
require('@babel/plugin-transform-nullish-coalescing-operator').default,
].filter(Boolean),
overrides: [
isFlowEnabled && {
Expand Down
12 changes: 6 additions & 6 deletions packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
],
"dependencies": {
"@babel/core": "^7.16.0",
"@babel/plugin-proposal-class-properties": "^7.16.0",
"@babel/plugin-proposal-decorators": "^7.16.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
"@babel/plugin-proposal-numeric-separator": "^7.16.0",
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
"@babel/plugin-proposal-private-methods": "^7.16.0",
"@babel/plugin-proposal-private-property-in-object": "^7.16.7",
"@babel/plugin-transform-class-properties": "^7.16.0",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.16.0",
"@babel/plugin-transform-numeric-separator": "^7.16.0",
"@babel/plugin-transform-optional-chaining": "^7.16.0",
"@babel/plugin-transform-private-methods": "^7.16.0",
"@babel/plugin-transform-private-property-in-object": "^7.16.7",
"@babel/plugin-transform-flow-strip-types": "^7.16.0",
"@babel/plugin-transform-react-display-name": "^7.16.0",
"@babel/plugin-transform-runtime": "^7.16.4",
Expand Down