babel-preset-react-app 7.0.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
@@ -24,7 +24,7 @@ npm install babel-preset-react-app --save-dev
24
24
 
25
25
  Then create a file named `.babelrc` with following contents in the root folder of your project:
26
26
 
27
- ```js
27
+ ```json
28
28
  {
29
29
  "presets": ["react-app"]
30
30
  }
@@ -34,9 +34,9 @@ This preset uses the `useBuiltIns` option with [transform-object-rest-spread](ht
34
34
 
35
35
  ## Usage with Flow
36
36
 
37
- Flow is enabled by default. Make sure you have a `.flowconfig` file at the root directory. You can also use the `flow` option on `.babelrc`:
37
+ Make sure you have a `.flowconfig` file at the root directory. You can also use the `flow` option on `.babelrc`:
38
38
 
39
- ```
39
+ ```json
40
40
  {
41
41
  "presets": [["react-app", { "flow": true, "typescript": false }]]
42
42
  }
@@ -44,9 +44,9 @@ Flow is enabled by default. Make sure you have a `.flowconfig` file at the root
44
44
 
45
45
  ## Usage with TypeScript
46
46
 
47
- TypeScript is enabled by default. Make sure you have a `tsconfig.json` file at the root directory. You can also use the `typescript` option on `.babelrc`:
47
+ Make sure you have a `tsconfig.json` file at the root directory. You can also use the `typescript` option on `.babelrc`:
48
48
 
49
- ```
49
+ ```json
50
50
  {
51
51
  "presets": [["react-app", { "flow": false, "typescript": true }]]
52
52
  }
package/create.js CHANGED
@@ -79,17 +79,11 @@ module.exports = function(api, opts, env) {
79
79
  // Latest stable ECMAScript features
80
80
  require('@babel/preset-env').default,
81
81
  {
82
- // We want Create React App to be IE 9 compatible until React itself
83
- // no longer works with IE 9
84
- targets: {
85
- ie: 9,
86
- },
87
- // Users cannot override this behavior because this Babel
88
- // configuration is highly tuned for ES5 support
89
- ignoreBrowserslistConfig: true,
90
- // If users import all core-js they're probably not concerned with
91
- // bundle size. We shouldn't rely on magic to try and shrink it.
92
- useBuiltIns: false,
82
+ // Allow importing core-js in entrypoint and use browserlist to select polyfills
83
+ useBuiltIns: 'entry',
84
+ // Set the corejs version we are using to avoid warnings in console
85
+ // This will need to change once we upgrade to corejs@3
86
+ corejs: 3,
93
87
  // Do not transform modules to CJS
94
88
  modules: false,
95
89
  // Exclude transforms that make all code slower
@@ -126,7 +120,26 @@ module.exports = function(api, opts, env) {
126
120
  // Necessary to include regardless of the environment because
127
121
  // in practice some other transforms (such as object-rest-spread)
128
122
  // don't work without it: https://github.com/babel/babel/issues/7215
129
- require('@babel/plugin-transform-destructuring').default,
123
+ [
124
+ require('@babel/plugin-transform-destructuring').default,
125
+ {
126
+ // Use loose mode for performance:
127
+ // https://github.com/facebook/create-react-app/issues/5602
128
+ loose: false,
129
+ selectiveLoose: [
130
+ 'useState',
131
+ 'useEffect',
132
+ 'useContext',
133
+ 'useReducer',
134
+ 'useCallback',
135
+ 'useMemo',
136
+ 'useRef',
137
+ 'useImperativeHandle',
138
+ 'useLayoutEffect',
139
+ 'useDebugValue',
140
+ ],
141
+ },
142
+ ],
130
143
  // Turn on legacy decorators for TypeScript files
131
144
  isTypeScriptEnabled && [
132
145
  require('@babel/plugin-proposal-decorators').default,
package/dependencies.js CHANGED
File without changes
package/dev.js CHANGED
File without changes
package/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "babel-preset-react-app",
3
- "version": "7.0.1",
3
+ "version": "8.0.0",
4
4
  "description": "Babel preset used by Create React App",
5
- "repository": "facebook/create-react-app",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/facebook/create-react-app.git",
8
+ "directory": "packages/babel-preset-react-app"
9
+ },
6
10
  "license": "MIT",
7
11
  "bugs": {
8
12
  "url": "https://github.com/facebook/create-react-app/issues"
@@ -17,24 +21,24 @@
17
21
  "test.js"
18
22
  ],
19
23
  "dependencies": {
20
- "@babel/core": "7.2.2",
21
- "@babel/plugin-proposal-class-properties": "7.3.0",
22
- "@babel/plugin-proposal-decorators": "7.3.0",
23
- "@babel/plugin-proposal-object-rest-spread": "7.3.2",
24
+ "@babel/core": "7.4.3",
25
+ "@babel/plugin-proposal-class-properties": "7.4.0",
26
+ "@babel/plugin-proposal-decorators": "7.4.0",
27
+ "@babel/plugin-proposal-object-rest-spread": "7.4.3",
24
28
  "@babel/plugin-syntax-dynamic-import": "7.2.0",
25
- "@babel/plugin-transform-classes": "7.2.2",
26
- "@babel/plugin-transform-destructuring": "7.3.2",
27
- "@babel/plugin-transform-flow-strip-types": "7.2.3",
29
+ "@babel/plugin-transform-classes": "7.4.3",
30
+ "@babel/plugin-transform-destructuring": "7.4.3",
31
+ "@babel/plugin-transform-flow-strip-types": "7.4.0",
28
32
  "@babel/plugin-transform-react-constant-elements": "7.2.0",
29
33
  "@babel/plugin-transform-react-display-name": "7.2.0",
30
- "@babel/plugin-transform-runtime": "7.2.0",
31
- "@babel/preset-env": "7.3.1",
34
+ "@babel/plugin-transform-runtime": "7.4.3",
35
+ "@babel/preset-env": "7.4.3",
32
36
  "@babel/preset-react": "7.0.0",
33
- "@babel/preset-typescript": "7.1.0",
34
- "@babel/runtime": "7.3.1",
35
- "babel-loader": "8.0.5",
37
+ "@babel/preset-typescript": "7.3.3",
38
+ "@babel/runtime": "7.4.3",
36
39
  "babel-plugin-dynamic-import-node": "2.2.0",
37
- "babel-plugin-macros": "2.5.0",
40
+ "babel-plugin-macros": "2.5.1",
38
41
  "babel-plugin-transform-react-remove-prop-types": "0.4.24"
39
- }
42
+ },
43
+ "gitHead": "265c1592dcf3853122dcdd50e1bfc1e43f697fbe"
40
44
  }
package/prod.js CHANGED
File without changes
package/test.js CHANGED
File without changes
File without changes