Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable TypeScript json module resolver #5531

Merged
merged 2 commits into from
Oct 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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