File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
packages/react-scripts/scripts/utils Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,14 @@ function verifyTypeScriptSetup() {
218218 if ( appTsConfig . compilerOptions == null ) {
219219 appTsConfig . compilerOptions = { } ;
220220 firstTimeSetup = true ;
221+ } else {
222+ // This is bug fix code of https://github.com/facebook/create-react-app/issues/9868
223+ // Bellow code release variable from non-extensible and freeze status.
224+ appTsConfig . compilerOptions = JSON . parse ( JSON . stringify ( appTsConfig . compilerOptions ) ) ;
225+
226+ // Original appTsConfig.compilerOptions status
227+ // Object.isExtensible(appTsConfig.compilerOptions) output: false
228+ // Object.isFrozen(appTsConfig.compilerOptions) output: true
221229 }
222230
223231 for ( const option of Object . keys ( compilerOptions ) ) {
You can’t perform that action at this time.
0 commit comments