Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
118 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/node_modules/babel-preset-react-app/create.js b/node_modules/babel-preset-react-app/create.js | ||
index 99a930b..c898a12 100644 | ||
--- a/node_modules/babel-preset-react-app/create.js | ||
+++ b/node_modules/babel-preset-react-app/create.js | ||
@@ -96,7 +96,11 @@ module.exports = function (api, opts, env) { | ||
// Will use the native built-in instead of trying to polyfill | ||
// behavior for any plugins that require one. | ||
...(opts.runtime !== 'automatic' ? { useBuiltIns: true } : {}), | ||
- runtime: opts.runtime || 'classic', | ||
+ // runtime: opts.runtime || 'classic', | ||
+ // See https://github.com/welldone-software/why-did-you-render/issues/154#issuecomment-732711993 | ||
+ runtime: 'automatic', | ||
+ development: process.env.NODE_ENV === 'development', | ||
+ importSource: '@welldone-software/why-did-you-render', | ||
}, | ||
], | ||
isTypeScriptEnabled && [require('@babel/preset-typescript').default], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/// <reference types="@welldone-software/why-did-you-render" /> | ||
|
||
import React from 'react'; | ||
|
||
if (process.env.NODE_ENV === 'development') { | ||
const whyDidYouRender = require('@welldone-software/why-did-you-render'); | ||
whyDidYouRender(React, { | ||
trackAllPureComponents: true, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters