babel-preset-expo 9.1.0 → 9.2.1

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/README.md CHANGED
@@ -4,7 +4,7 @@ This preset extends the default React Native preset (`metro-react-native-babel-p
4
4
 
5
5
  You can use this preset in any React Native project as a drop-in replacement for `metro-react-native-babel-preset`. If your project isn't using native font loading or web support then this preset will only add support for decorators with `@babel/plugin-proposal-decorators` - this is mostly used for supporting legacy community libraries.
6
6
 
7
- If you start your **web** project with `@expo/webpack-config` or `expo start:web` and your project doesn't contain a `babel.config.js` or a `.babelrc` then it will default to using `babel-preset-expo` for loading.
7
+ If you start your **web** project with `@expo/webpack-config` or `npx expo start` and your project doesn't contain a `babel.config.js` or a `.babelrc` then it will default to using `babel-preset-expo` for loading.
8
8
 
9
9
  If you have problems with the code in this repository, please file issues & bug reports
10
10
  at https://github.com/expo/expo. Thanks!
@@ -64,7 +64,7 @@ This property is passed down to [`@babel/plugin-transform-react-jsx`](https://ba
64
64
 
65
65
  `string`, defaults to `react`
66
66
 
67
- This option allows specifying a custom import source for importing functions.
67
+ This option allows specifying a custom import source for importing functions.
68
68
 
69
69
  ```js
70
70
  [
@@ -117,7 +117,7 @@ Enabling this option will allow your project to run with older JavaScript syntax
117
117
 
118
118
  > `TypeError: Cannot assign to read only property 'exports' of object '#<Object>'`
119
119
 
120
- **default:** `false`
120
+ **default:** `false` when using Webpack. `true` otherwise.
121
121
 
122
122
  ```js
123
123
  [
package/index.js CHANGED
@@ -17,7 +17,12 @@ module.exports = function (api, options = {}) {
17
17
 
18
18
  const platformOptions =
19
19
  platform === 'web'
20
- ? { disableImportExportTransform: true, ...web }
20
+ ? {
21
+ // Only disable import/export transform when Webpack is used because
22
+ // Metro does not support tree-shaking.
23
+ disableImportExportTransform: !!isWebpack,
24
+ ...web,
25
+ }
21
26
  : { disableImportExportTransform: false, ...native };
22
27
 
23
28
  // Note that if `options.lazyImports` is not set (i.e., `null` or `undefined`),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babel-preset-expo",
3
- "version": "9.1.0",
3
+ "version": "9.2.1",
4
4
  "description": "The Babel preset for Expo projects",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -49,12 +49,12 @@
49
49
  "@babel/plugin-transform-react-jsx": "^7.12.17",
50
50
  "@babel/preset-env": "^7.12.9",
51
51
  "babel-plugin-module-resolver": "^4.1.0",
52
- "babel-plugin-react-native-web": "~0.17.1",
53
- "metro-react-native-babel-preset": "~0.67.0"
52
+ "babel-plugin-react-native-web": "~0.18.2",
53
+ "metro-react-native-babel-preset": "0.72.3"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@babel/core": "^7.12.9",
57
57
  "jest": "^26.6.3"
58
58
  },
59
- "gitHead": "89a27c0ca0ca8becd7546697298e874a15e94faf"
59
+ "gitHead": "1327fe2bc92f71f7213cd5ddd40fa4f8a5336bc6"
60
60
  }
package/CHANGELOG.md DELETED
@@ -1,37 +0,0 @@
1
- # Changelog
2
-
3
- ## Unpublished
4
-
5
- ### 🛠 Breaking changes
6
-
7
- ### 🎉 New features
8
-
9
- ### 🐛 Bug fixes
10
-
11
- ### 💡 Others
12
-
13
- ## 9.1.0 — 2022-04-18
14
-
15
- ### 📚 3rd party library updates
16
-
17
- - Upgrade to react-native 0.66. ([#15914](https://github.com/expo/expo/pull/15914) by [@kudo](https://github.com/kudo))
18
-
19
- ## 9.0.2 — 2021-12-15
20
-
21
- ### 🐛 Bug fixes
22
-
23
- - Fix support for node12. ([#15545](https://github.com/expo/expo/pull/15545) by [@lapz](https://github.com/lapz))
24
-
25
- ## 9.0.1 — 2021-12-08
26
-
27
- _This version does not introduce any user-facing changes._
28
-
29
- ## 9.0.0 — 2021-12-03
30
-
31
- ### 🛠 Breaking changes
32
-
33
- - Changed default value of `jsxRuntime` to `automatic` ([#14995](https://github.com/expo/expo/pull/14995) by [@EvanBacon](https://github.com/EvanBacon))
34
-
35
- ### 🎉 New features
36
-
37
- - Added option `jsxImportSource` to allow passing in a custom importSource ([#15275](https://github.com/expo/expo/pull/15275) by [@kbrandwijk](https://github.com/kbrandwijk))