-
Notifications
You must be signed in to change notification settings - Fork 1
[Init] FSD 구조의 폴더 구조 세팅 & 절대 경로 세팅 #9
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
Changes from 9 commits
692bda3
4e8cdd3
16bde78
1e777b8
755c3c1
de0041c
57b35fd
e3f6e73
b7f63b5
f8c51d9
eb1249f
1d9d381
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import KERORO from "@images/comfit_web_status.jpg"; | ||
|
|
||
| const HomePage = () => { | ||
| return ( | ||
| <div> | ||
| <h1>Welcome to the Home Page</h1> | ||
| <img src={KERORO} alt="Keroro" /> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export { HomePage }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,26 @@ | |
| "noUnusedParameters": true, | ||
| "erasableSyntaxOnly": true, | ||
| "noFallthroughCasesInSwitch": true, | ||
| "noUncheckedSideEffectImports": true | ||
| "noUncheckedSideEffectImports": true, | ||
|
|
||
| /* Path Alias*/ | ||
| "baseUrl": ".", | ||
| "paths": { | ||
| "@/*": ["src/*"], | ||
| "@app/*": ["src/app/*"], | ||
| "@pages/*": ["src/pages/*"], | ||
| "@widgets/*": ["src/widgets/*"], | ||
| "@shared/*": ["src/shared/*"], | ||
| "@images/*": ["src/shared/assets/images/*"], | ||
| "@icons/*": ["src/shared/assets/icons/*"], | ||
| "@api/*": ["src/shared/api/*"], | ||
| "@config/*": ["src/shared/config/*"], | ||
| "@lib/*": ["src/shared/lib/*"], | ||
| "@model/*": ["src/shared/model/*"], | ||
| "@styles/*": ["src/shared/styles/*"], | ||
| "@types/*": ["src/shared/types/*"], | ||
| "@ui/*": ["src/shared/ui/*"] | ||
| } | ||
| }, | ||
| "include": ["src"] | ||
| } | ||
|
Comment on lines
29
to
48
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 레이어 단위( |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,25 @@ | ||
| import { defineConfig } from 'vite' | ||
| import react from '@vitejs/plugin-react-swc' | ||
| import { defineConfig } from "vite"; | ||
| import react from "@vitejs/plugin-react-swc"; | ||
| import path from "path"; | ||
|
|
||
| // https://vite.dev/config/ | ||
| export default defineConfig({ | ||
| plugins: [react()], | ||
| }) | ||
| resolve: { | ||
| alias: { | ||
| "@": path.resolve(__dirname, "./src"), | ||
| "@app": path.resolve(__dirname, "./src/app"), | ||
| "@pages": path.resolve(__dirname, "./src/pages"), | ||
| "@widgets": path.resolve(__dirname, "./src/widgets"), | ||
| "@shared": path.resolve(__dirname, "./src/shared"), | ||
| "@images": path.resolve(__dirname, "./src/shared/assets/images"), | ||
| "@icons": path.resolve(__dirname, "./src/shared/assets/icons"), | ||
| "@api": path.resolve(__dirname, "./src/shared/api"), | ||
| "@config": path.resolve(__dirname, "./src/shared/config"), | ||
| "@model": path.resolve(__dirname, "./src/shared/model"), | ||
| "@styles": path.resolve(__dirname, "./src/shared/styles"), | ||
| "@types": path.resolve(__dirname, "./src/shared/types"), | ||
| "@ui": path.resolve(__dirname, "./src/shared/ui"), | ||
| }, | ||
| }, | ||
|
Comment on lines
8
to
26
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오 실수로 빼먹은 거 같아여!! 예리한 지적 감사합니다~ |
||
| }); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기에서도 alias 적용해서
@app/App처럼 경로 가져와도 좋을 것 같아요 😊There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
바아로 반영했습니둥~