Skip to content

Commit 974ec05

Browse files
kassensfacebook-github-bot-9
authored andcommitted
Fix for displayName transform
Summary: The `react.displayName` transform was added in 93b9329. 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 facebook#2905 Reviewed By: @vjeux Differential Revision: D2473447 Pulled By: @kassens
1 parent 74f467b commit 974ec05

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

packager/packager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ function getAppMiddleware(options) {
291291
nonPersistent: options.nonPersistent,
292292
projectRoots: options.projectRoots,
293293
blacklistRE: blacklist(),
294-
cacheVersion: '2',
294+
cacheVersion: '3',
295295
transformModulePath: transformerPath,
296296
assetRoots: options.assetRoots,
297297
assetExts: ['png', 'jpeg', 'jpg'],

packager/react-packager/.babelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"es7.objectRestSpread",
2121
"flow",
2222
"react",
23+
"react.displayName",
2324
"regenerator"
2425
],
2526
"sourceMaps": false

packager/transformer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ function transform(src, filename, options) {
3131
comments: false,
3232
filename,
3333
whitelist: [
34+
// Keep in sync with packager/react-packager/.babelrc
3435
'es6.arrowFunctions',
3536
'es6.blockScoping',
3637
'es6.classes',

0 commit comments

Comments
 (0)