mirror of
https://github.com/status-im/react-native.git
synced 2025-01-13 11:05:21 +00:00
Add transform-es2015-function-name to the react-native babel preset. Fixes #6716
Summary:Stateless function components (at least those using arrow functions) are not assigned names when this transform is omitted. Rebased against master and kept the original author from #6717 cc martinbigio bestander Closes https://github.com/facebook/react-native/pull/6794 Differential Revision: D3133791 Pulled By: mkonicek fb-gh-sync-id: bb7790ad17d1520da5ab95580548d29d0c0f397d fbshipit-source-id: bb7790ad17d1520da5ab95580548d29d0c0f397d
This commit is contained in:
parent
f7bcb3e98d
commit
855c0cc25e
@ -18,6 +18,7 @@ module.exports = {
|
||||
'syntax-class-properties',
|
||||
'syntax-trailing-function-commas',
|
||||
'transform-class-properties',
|
||||
'transform-es2015-function-name',
|
||||
'transform-es2015-arrow-functions',
|
||||
'transform-es2015-block-scoping',
|
||||
'transform-es2015-classes',
|
||||
|
@ -22,6 +22,7 @@
|
||||
"babel-plugin-syntax-jsx": "^6.5.0",
|
||||
"babel-plugin-syntax-trailing-function-commas": "^6.5.0",
|
||||
"babel-plugin-transform-class-properties": "^6.5.0",
|
||||
"babel-plugin-transform-es2015-function-name": "^6.5.0",
|
||||
"babel-plugin-transform-es2015-arrow-functions": "^6.5.0",
|
||||
"babel-plugin-transform-es2015-block-scoping": "^6.5.0",
|
||||
"babel-plugin-transform-es2015-classes": "^6.5.0",
|
||||
|
@ -14,6 +14,7 @@ module.exports = {
|
||||
'babel-plugin-syntax-class-properties': require('babel-plugin-syntax-class-properties'),
|
||||
'babel-plugin-syntax-trailing-function-commas': require('babel-plugin-syntax-trailing-function-commas'),
|
||||
'babel-plugin-transform-class-properties': require('babel-plugin-transform-class-properties'),
|
||||
'babel-plugin-transform-es2015-function-name': require('babel-plugin-transform-es2015-function-name'),
|
||||
'babel-plugin-transform-es2015-arrow-functions': require('babel-plugin-transform-es2015-arrow-functions'),
|
||||
'babel-plugin-transform-es2015-block-scoping': require('babel-plugin-transform-es2015-block-scoping'),
|
||||
'babel-plugin-transform-es2015-classes': require('babel-plugin-transform-es2015-classes'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user