Skip to content

Commit

Permalink
Enable TypeScript json module resolver (facebook#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 nate770 committed Oct 30, 2018
1 parent 6c74e0a commit 876a738
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 876a738

Please sign in to comment.