Skip to content

Commit ee4af55

Browse files
committedSep 26, 2019
Added the alias for profiling and output change to keep the classNames and functionNames for human readbility
1 parent 0d1775e commit ee4af55

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎packages/react-scripts/config/webpack.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ module.exports = function(webpackEnv) {
240240
// Turned on because emoji and regex is not minified properly using default
241241
// https://github.com/facebook/create-react-app/issues/2488
242242
ascii_only: true,
243+
// Added for profiling in devtools
244+
keep_classnames: isEnvProductionProfile,
245+
keep_fnames: isEnvProductionProfile,
243246
},
244247
},
245248
// Use multi-process parallel running to improve the build speed
@@ -303,6 +306,10 @@ module.exports = function(webpackEnv) {
303306
// Support React Native Web
304307
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
305308
'react-native': 'react-native-web',
309+
...(isEnvProductionProfile && {
310+
'react-dom$': 'react-dom/profiling',
311+
'scheduler/tracing': 'scheduler/tracing-profiling',
312+
}),
306313
},
307314
plugins: [
308315
// Adds support for installing with Plug'n'Play, leading to faster installs and adding

0 commit comments

Comments
 (0)