Skip to content

Commit 7da66d0

Browse files
committed
fix : yarn tsc --noEmit 뜨는 에러 해결
web 환경에서 components 폴더를 @web/components로 설정한 상황에서 tsc가 인식하지 못하는 에러
1 parent 3689eb0 commit 7da66d0

File tree

7 files changed

+9
-36
lines changed

7 files changed

+9
-36
lines changed

apps/web/src/app/login/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Button, Input } from "@/components";
1+
import { Button, Input } from "@web/components";
22

33
const loginPage = () => {
44
return (

apps/web/src/app/page.tsx

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,3 @@
1-
import { Input } from "@/components";
2-
31
export default function Home() {
4-
const selectItems = ["BackEnd", "FrontEnd", "AI", "Design"];
5-
return (
6-
<>
7-
<Input placeholder="아이디를 입력해주세요.." label="아이디" />
8-
<Input
9-
placeholder="비밀번호를 입력해주세요.."
10-
label="비밀번호"
11-
type="password"
12-
/>
13-
<Input
14-
placeholder="비밀번호를 입력해주세요.."
15-
label="비밀번호 확인"
16-
type="password"
17-
/>
18-
<Input
19-
placeholder="전공 선택"
20-
label="전공 선택"
21-
type="select"
22-
selectItems={selectItems}
23-
/>
24-
</>
25-
);
2+
return <></>;
263
}

apps/web/src/app/signin/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Button, Input } from "@/components";
1+
import { Button, Input } from "@web/components";
22

33
const signInPage = () => {
44
const selectItems = [

apps/web/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
],
2222
"baseUrl": ".",
2323
"paths": {
24-
"@/*": ["./src/*"]
24+
"@web/*": ["./src/*"]
2525
}
2626
},
2727
"include": [

apps/webview/package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,8 @@
1010
"lint": "eslint .",
1111
"preview": "vite preview"
1212
},
13-
"dependencies": {
14-
"react": "^19.0.0",
15-
"react-dom": "^19.0.0"
16-
},
1713
"devDependencies": {
1814
"@eslint/js": "^9.21.0",
19-
"@types/react": "^19.0.10",
20-
"@types/react-dom": "^19.0.4",
2115
"@vitejs/plugin-react-swc": "^3.8.1",
2216
"eslint": "^9.21.0",
2317
"eslint-plugin-react-hooks": "^5.1.0",

apps/webview/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"noEmit": false, // false로 두고 allowImportingTsExtensions 제거
2020
"plugins": [{ "name": "@yarnpkg/typescript-plugin" }],
2121
"paths": {
22-
"@/*": ["src/*"],
22+
// Maps "@webview/*" imports to the "src" directory for cleaner and more intuitive module resolution
23+
"@webview/*": ["src/*"],
2324
"@mozu/ui": ["../ui/dist"],
2425
"@mozu/design-token": ["../design-token/dist"],
2526
"@configs/util": ["../util-config/dist"]

tsconfig.base.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
"target": "ESNext",
44
"module": "ESNext",
5-
"moduleResolution": "Node",
5+
"moduleResolution": "node",
66
"esModuleInterop": true,
77
"strict": true,
88
"jsx": "preserve",
@@ -12,7 +12,8 @@
1212
"paths": {
1313
"@stracker/design-token": ["packages/design-token"],
1414
"@stracker/web": ["apps/web"],
15-
"@stracker/web-view": ["apps/web-view"]
15+
"@stracker/web-view": ["apps/web-view"],
16+
"@web/*": ["apps/web/src/*"]
1617
}
1718
}
1819
}

0 commit comments

Comments
 (0)