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() {
218
218
if ( appTsConfig . compilerOptions == null ) {
219
219
appTsConfig . compilerOptions = { } ;
220
220
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
221
229
}
222
230
223
231
for ( const option of Object . keys ( compilerOptions ) ) {
You can’t perform that action at this time.
0 commit comments