Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: auto-assign-author-and-reviewer
if: github.event_name == 'pull_request'&&github.event.action=='opened'
if: github.event_name == 'pull_request' && github.event.action == 'opened'
uses: hkusu/review-assign-action@v1
with:
assignees: ${{github.actor}} # 담당자 설정
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script type="module" src="/src/app/main.tsx"></script>
</body>
</html>
4 changes: 3 additions & 1 deletion src/App.tsx → src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { HomePage } from "@/pages/home/ui/home-page";

const App = () => {
return (
<>
<p>컴핏 화이팅</p>
<HomePage />
</>
);
};
Expand Down
Empty file added src/app/layout/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion src/main.tsx → src/app/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import App from "./App.tsx";
import App from "./App";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기에서도 alias 적용해서 @app/App처럼 경로 가져와도 좋을 것 같아요 😊

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

바아로 반영했습니둥~


createRoot(document.getElementById("root")!).render(
<StrictMode>
Expand Down
Empty file added src/app/providers/.gitkeep
Empty file.
Empty file added src/app/routes/.gitkeep
Empty file.
Empty file added src/app/styles/.gitkeep
Empty file.
Empty file.
Empty file added src/pages/experience/.gitkeep
Empty file.
Empty file.
12 changes: 12 additions & 0 deletions src/pages/home/ui/home-page.tsx
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 };
Empty file added src/pages/login/.gitkeep
Empty file.
Empty file added src/pages/my-page/.gitkeep
Empty file.
Empty file added src/pages/onboarding/.gitkeep
Empty file.
Empty file added src/pages/register/.gitkeep
Empty file.
Empty file.
Binary file added src/shared/assets/images/comfit_web_status.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added src/shared/lib/.gitkeep
Empty file.
Empty file added src/shared/model/.gitkeep
Empty file.
Empty file added src/shared/styles/.gitkeep
Empty file.
Empty file.
Empty file added src/shared/types/.gitkeep
Empty file.
21 changes: 20 additions & 1 deletion tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

@u-zzn u-zzn Jan 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

레이어 단위(@app/@pages/@widgets/@shared)랑 shared segment 단위(@api/@config/...)까지 꼼꼼하게 paths 열어두신 점 굳굳입니당!! 👍

24 changes: 21 additions & 3 deletions vite.config.ts
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tsconfig에는 @lib/*가 있는데 vite.config.ts alias에는 @lib가 빠져있어서 빌드 시에 @lib/... import가 깨질 수도 있을 것 같은데, alias 세팅에 @lib관련 세팅(@lib: path.resolve(__dirname, "./src/shared/lib"))도 추가하는게 어떨까요? ☺️

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 실수로 빼먹은 거 같아여!! 예리한 지적 감사합니다~

});