Skip to content

Commit 56e8070

Browse files
authored
依存パッケージを最新に更新 & 絶対パスの設定を追加 (#55)
* update deps * setup absolute path
1 parent 50c53b2 commit 56e8070

File tree

6 files changed

+19
-15
lines changed

6 files changed

+19
-15
lines changed

package.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@
99
"react": "18.2.0",
1010
"react-dom": "18.2.0",
1111
"ress": "5.0.2",
12-
"styled-components": "5.3.11"
12+
"styled-components": "6.1.8"
1313
},
1414
"devDependencies": {
15-
"@types/react": "18.2.12",
16-
"@types/react-dom": "18.2.5",
17-
"@types/styled-components": "5.1.26",
18-
"@vitejs/plugin-react": "4.0.0",
19-
"prettier": "2.8.8",
20-
"typescript": "5.1.3",
21-
"vite": "4.3.9"
15+
"@types/react": "18.2.79",
16+
"@types/react-dom": "18.2.25",
17+
"@types/styled-components": "5.1.34",
18+
"@vitejs/plugin-react": "4.2.1",
19+
"prettier": "3.2.5",
20+
"typescript": "5.4.5",
21+
"vite": "5.2.9",
22+
"vite-tsconfig-paths": "4.3.2"
2223
}
2324
}

src/components/FriendRequestForm/FriendRequestForm.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { UserList } from '../UserList/UserList'
21

2+
import { UserList } from 'src/components/UserList/UserList'
33
import styles from './FriendRequestForm.module.css'
44

55
const FriendRequestForm = () => {

src/components/UserList/UserList.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Data Source
22
import { users } from '../../data/users'
3-
import { getUsers } from '../../data/getUsers'
3+
import { getUsers } from 'src/data/getUsers'
44

55
// CSS Modules
66
import styles from './UserList.module.css'

src/main.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client'
33

44
import 'ress'
55

6-
import { FriendRequestForm } from './components/FriendRequestForm/FriendRequestForm'
6+
import { FriendRequestForm } from 'src/components/FriendRequestForm/FriendRequestForm'
77

88
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
99
<React.StrictMode>

tsconfig.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"compilerOptions": {
3-
"baseUrl": "./",
43
"target": "ESNext",
54
"lib": ["dom", "dom.iterable", "esnext"],
65
"allowJs": false,
@@ -19,7 +18,10 @@
1918
"isolatedModules": true,
2019
"jsx": "react-jsx",
2120
"allowSyntheticDefaultImports": true,
22-
"noFallthroughCasesInSwitch": true
21+
"noFallthroughCasesInSwitch": true,
22+
"paths": {
23+
"src/*": ["./src/*"],
24+
}
2325
},
2426
"exclude": ["node_modules"],
2527
"include": ["**/*.ts", "**/*.tsx"]

vite.config.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { defineConfig } from 'vite'
2+
import tsconfigPaths from 'vite-tsconfig-paths'
23
import react from '@vitejs/plugin-react'
34

4-
// https://vitejs.dev/config/
5+
56
export default defineConfig({
6-
plugins: [react()],
7+
plugins: [react(), tsconfigPaths()],
78
})

0 commit comments

Comments
 (0)