From 56e80705fb03808892e8ceba436a4292f29df365 Mon Sep 17 00:00:00 2001 From: Hidemi Yukita Date: Thu, 18 Apr 2024 18:14:18 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BE=9D=E5=AD=98=E3=83=91=E3=83=83=E3=82=B1?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=82=92=E6=9C=80=E6=96=B0=E3=81=AB=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=20&=20=E7=B5=B6=E5=AF=BE=E3=83=91=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=82=92=E8=BF=BD=E5=8A=A0=20(#55)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update deps * setup absolute path --- package.json | 17 +++++++++-------- .../FriendRequestForm/FriendRequestForm.tsx | 2 +- src/components/UserList/UserList.tsx | 2 +- src/main.tsx | 2 +- tsconfig.json | 6 ++++-- vite.config.ts | 5 +++-- 6 files changed, 19 insertions(+), 15 deletions(-) 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()], })