Skip to content

Commit

Permalink
Added the alias for profiling and output change to keep the className…
Browse files Browse the repository at this point in the history
…s and functionNames for human readbility
  • Loading branch information
JacobMGEvans committed Sep 26, 2019
1 parent 0d1775e commit ee4af55
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/react-scripts/config/webpack.config.js
Expand Up @@ -240,6 +240,9 @@ module.exports = function(webpackEnv) {
// Turned on because emoji and regex is not minified properly using default
// https://github.com/facebook/create-react-app/issues/2488
ascii_only: true,
// Added for profiling in devtools
keep_classnames: isEnvProductionProfile,
keep_fnames: isEnvProductionProfile,
},
},
// Use multi-process parallel running to improve the build speed
Expand Down Expand Up @@ -303,6 +306,10 @@ module.exports = function(webpackEnv) {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web',
...(isEnvProductionProfile && {
'react-dom$': 'react-dom/profiling',
'scheduler/tracing': 'scheduler/tracing-profiling',
}),
},
plugins: [
// Adds support for installing with Plug'n'Play, leading to faster installs and adding
Expand Down

0 comments on commit ee4af55

Please sign in to comment.