diff --git a/packages/react-scripts/config/react-app.d.ts b/packages/react-scripts/config/react-app.d.ts index 5994114ffda..7a8476fa3ce 100644 --- a/packages/react-scripts/config/react-app.d.ts +++ b/packages/react-scripts/config/react-app.d.ts @@ -2,11 +2,6 @@ // Do not edit this file. It's replaced every time you launch a toolbox action. // If you need to add additional declarations, please do so in a new file. -declare module '*.json' { - const value: any; - export default value; -} - declare module '*.bmp' { const src: string; export default src; diff --git a/packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js b/packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js index 7f05f1ba73f..b2f37244919 100644 --- a/packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js +++ b/packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js @@ -29,9 +29,10 @@ const compilerOptions = { allowSyntheticDefaultImports: { suggested: true }, strict: { suggested: true }, - // This values are required and cannot be changed by the user + // These values are required and cannot be changed by the user module: { value: 'esnext', reason: 'for import() and import/export' }, moduleResolution: { value: 'node', reason: 'to match webpack resolution' }, + resolveJsonModule: { value: true, reason: 'to match webpack loader' }, isolatedModules: { value: true, reason: 'implementation limitation' }, noEmit: { value: true }, jsx: { value: 'preserve', reason: 'JSX is compiled by Babel' },