mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-08-15 18:45:06 +00:00
Build react-native-web using @babel/runtime
Share babel helpers across files. Reduces flat bundle size by 30K minified and 3K gzipped.
This commit is contained in:
@@ -43,7 +43,13 @@ module.exports = function (api) {
|
||||
['babel-plugin-transform-react-remove-prop-types', { mode: 'wrap' }],
|
||||
['@babel/plugin-proposal-class-properties', { loose: true }],
|
||||
['@babel/plugin-proposal-object-rest-spread', { useBuiltIns: true }],
|
||||
'@babel/plugin-proposal-nullish-coalescing-operator'
|
||||
'@babel/plugin-proposal-nullish-coalescing-operator',
|
||||
[
|
||||
'@babel/plugin-transform-runtime',
|
||||
{
|
||||
version: '7.18.6'
|
||||
}
|
||||
]
|
||||
].concat(modules ? ['babel-plugin-add-module-exports'] : [])
|
||||
};
|
||||
};
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
"@babel/plugin-proposal-class-properties": "^7.12.13",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.13",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.12.13",
|
||||
"@babel/plugin-transform-runtime": "^7.12.15",
|
||||
"@babel/plugin-transform-runtime": "^7.18.6",
|
||||
"@babel/preset-env": "^7.12.13",
|
||||
"@babel/preset-flow": "^7.12.13",
|
||||
"@babel/preset-react": "^7.12.13",
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"!**/__tests__"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.6",
|
||||
"create-react-class": "^15.7.0",
|
||||
"fbjs": "^3.0.0",
|
||||
"inline-style-prefixer": "^6.0.0",
|
||||
|
||||
Reference in New Issue
Block a user