diff --git a/package.json b/package.json index c1b72f0..7f60435 100644 --- a/package.json +++ b/package.json @@ -9,15 +9,16 @@ "react": "18.2.0", "react-dom": "18.2.0", "ress": "5.0.2", - "styled-components": "5.3.11" + "styled-components": "6.1.8" }, "devDependencies": { - "@types/react": "18.2.12", - "@types/react-dom": "18.2.5", - "@types/styled-components": "5.1.26", - "@vitejs/plugin-react": "4.0.0", - "prettier": "2.8.8", - "typescript": "5.1.3", - "vite": "4.3.9" + "@types/react": "18.2.79", + "@types/react-dom": "18.2.25", + "@types/styled-components": "5.1.34", + "@vitejs/plugin-react": "4.2.1", + "prettier": "3.2.5", + "typescript": "5.4.5", + "vite": "5.2.9", + "vite-tsconfig-paths": "4.3.2" } } diff --git a/src/components/FriendRequestForm/FriendRequestForm.tsx b/src/components/FriendRequestForm/FriendRequestForm.tsx index f2e2e45..1e4c115 100644 --- a/src/components/FriendRequestForm/FriendRequestForm.tsx +++ b/src/components/FriendRequestForm/FriendRequestForm.tsx @@ -1,5 +1,5 @@ -import { UserList } from '../UserList/UserList' +import { UserList } from 'src/components/UserList/UserList' import styles from './FriendRequestForm.module.css' const FriendRequestForm = () => { diff --git a/src/components/UserList/UserList.tsx b/src/components/UserList/UserList.tsx index 6f8a4e4..8615bc4 100644 --- a/src/components/UserList/UserList.tsx +++ b/src/components/UserList/UserList.tsx @@ -1,6 +1,6 @@ // Data Source import { users } from '../../data/users' -import { getUsers } from '../../data/getUsers' +import { getUsers } from 'src/data/getUsers' // CSS Modules import styles from './UserList.module.css' diff --git a/src/main.tsx b/src/main.tsx index 5142e21..a3f32c2 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client' import 'ress' -import { FriendRequestForm } from './components/FriendRequestForm/FriendRequestForm' +import { FriendRequestForm } from 'src/components/FriendRequestForm/FriendRequestForm' ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( diff --git a/tsconfig.json b/tsconfig.json index a0aae55..cff4693 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "baseUrl": "./", "target": "ESNext", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": false, @@ -19,7 +18,10 @@ "isolatedModules": true, "jsx": "react-jsx", "allowSyntheticDefaultImports": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, + "paths": { + "src/*": ["./src/*"], + } }, "exclude": ["node_modules"], "include": ["**/*.ts", "**/*.tsx"] diff --git a/vite.config.ts b/vite.config.ts index 5a33944..b0d57f2 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,8 @@ import { defineConfig } from 'vite' +import tsconfigPaths from 'vite-tsconfig-paths' import react from '@vitejs/plugin-react' -// https://vitejs.dev/config/ + export default defineConfig({ - plugins: [react()], + plugins: [react(), tsconfigPaths()], })