From a867ce00015ca1f5ac1f4783d5e4bcd9e846df88 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Sun, 19 Mar 2023 15:17:58 +1100 Subject: [PATCH] Use Create-React-App absolute path feature --- src/App.tsx | 2 +- tsconfig.json | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index b3ce4b2..586a4db 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,6 @@ import React from 'react'; import './App.css'; -import Header from './components/Header'; +import Header from 'components/Header'; import { Filters } from './Filters'; import { Pokemon } from './features/Pokedex/Pokemon'; diff --git a/tsconfig.json b/tsconfig.json index a273b0c..0eacc30 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, @@ -18,9 +14,10 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react-jsx" + "jsx": "react-jsx", + "incremental": true, + "baseUrl": "src" }, - "include": [ - "src" - ] + "include": ["src/**.tsx", "src/**.ts"], + "exclude": ["node_modules", "build", "public"] }