Skip to content

Commit

Permalink
Enable TypeScript json module resolver (#5531)
Browse files Browse the repository at this point in the history
* Enable TypeScript json module resolver

* Update verifyTypeScriptSetup.js
  • Loading branch information
brunolemos authored and Timer committed Oct 22, 2018
1 parent 2cf5cca commit 4c558d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions packages/react-scripts/config/react-app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down

0 comments on commit 4c558d7

Please sign in to comment.