Fix for displayName transform

Summary: The `react.displayName` transform was added in 93b9329b75.

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:
Jan Kassens 2015-09-23 20:15:18 -07:00 committed by facebook-github-bot-9
parent 74f467b00a
commit 974ec059e8
3 changed files with 3 additions and 1 deletions

View File

@ -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'],

View File

@ -20,6 +20,7 @@
"es7.objectRestSpread",
"flow",
"react",
"react.displayName",
"regenerator"
],
"sourceMaps": false

View File

@ -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',