`backend` 옆에 `front` 가 있을 이유가 없었다. negosium 의 negodata/front 를 그대로 베꼈고 그게 왜 front 인지는 따져보지 않았다 — 근거 없이 들여온 이름이라 바로잡는다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019uYhHQdssRubirPirrdJJC
37 lines
1.8 KiB
TypeScript
37 lines
1.8 KiB
TypeScript
import tailwindcss from '@tailwindcss/vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
import {defineConfig} from 'vite';
|
|
|
|
/**
|
|
* 내부 운영 화면(우리 회사용). 사장님 앱(`solution/frontend`)과 **번들이 갈린다** —
|
|
* 이 앱의 라우트 이름과 코드는 사장님 브라우저에 내려가지 않는다. 그게 앱을 가른 이유다.
|
|
*
|
|
* ★ `@` 를 이 앱이 아니라 **사장님 앱의 src** 로 겨눈다.
|
|
* 내부 화면이 쓰는 API 클라이언트·UI 프리미티브·수집 배선이 전부 거기 한 벌만 있고,
|
|
* 그 파일들도 자기들끼리 `@/...` 로 서로를 부르기 때문이다. 여기서 `@` 를 admin/src 로
|
|
* 잡으면 그 내부 참조가 전부 깨진다(실측: TS2307 14건).
|
|
* 복제해서 푸는 방법도 있지만 RecollectPanel 주석이 그걸 금지한다 —
|
|
* "수집 경로를 두 벌 만들면 확정 게이트"가 갈라진다.
|
|
*
|
|
* ★ 이 앱 고유의 파일은 `@admin` 이다. 방향은 admin → solution 한 쪽뿐이고,
|
|
* 반대가 생기면 번들을 가른 의미가 사라진다.
|
|
*/
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@admin': path.resolve(__dirname, 'src'),
|
|
'@': path.resolve(__dirname, '../solution/frontend/src'),
|
|
// css 는 더 구체적인 별칭이 먼저 와야 한다 — '@o2o/shared' 접두어가 먼저 걸리면
|
|
// 없는 경로(shared/src/tokens.css)로 떨어진다.
|
|
'@o2o/shared/tokens.css': path.resolve(__dirname, '../solution/shared/src/styles/tokens.css'),
|
|
'@o2o/shared/base.css': path.resolve(__dirname, '../solution/shared/src/styles/base.css'),
|
|
'@o2o/shared': path.resolve(__dirname, '../solution/shared/src'),
|
|
},
|
|
},
|
|
server: {
|
|
watch: {usePolling: true, interval: 300},
|
|
},
|
|
});
|