mirror of
https://github.com/status-im/react-native.git
synced 2025-02-25 23:55:23 +00:00
Fix for displayName transform
Summary: The `react.displayName` transform was added in 93b9329b758cde3e921b26e11ba91d9700d2a06d. That diff missed to update the `.babelrc` where the comment says it should stay in sync (I'm not sure where it's used though). I added a comment in the other direction so this can be prevented in the future. I also updated the `cacheVersion` so we actually transform the code again to add the missing displayName properties to unchanged components. Closes https://github.com/facebook/react-native/pull/2905 Reviewed By: @vjeux Differential Revision: D2473447 Pulled By: @kassens
This commit is contained in:
parent
74f467b00a
commit
974ec059e8
@ -291,7 +291,7 @@ function getAppMiddleware(options) {
|
||||
nonPersistent: options.nonPersistent,
|
||||
projectRoots: options.projectRoots,
|
||||
blacklistRE: blacklist(),
|
||||
cacheVersion: '2',
|
||||
cacheVersion: '3',
|
||||
transformModulePath: transformerPath,
|
||||
assetRoots: options.assetRoots,
|
||||
assetExts: ['png', 'jpeg', 'jpg'],
|
||||
|
@ -20,6 +20,7 @@
|
||||
"es7.objectRestSpread",
|
||||
"flow",
|
||||
"react",
|
||||
"react.displayName",
|
||||
"regenerator"
|
||||
],
|
||||
"sourceMaps": false
|
||||
|
@ -31,6 +31,7 @@ function transform(src, filename, options) {
|
||||
comments: false,
|
||||
filename,
|
||||
whitelist: [
|
||||
// Keep in sync with packager/react-packager/.babelrc
|
||||
'es6.arrowFunctions',
|
||||
'es6.blockScoping',
|
||||
'es6.classes',
|
||||
|
Loading…
x
Reference in New Issue
Block a user