- index.html — 첫 페이지 전까지 「불러오는 중」(테마 바탕 · 저장 테마 · 시스템 어두움) · 20 s 뒤 느린 연결 안내 · favicon 요청 없앰 - tools/preview_up.py — 앱 · CAD 빌드 뒤 vite preview(포트 = 개발 포트 − 1000 · /api · /b07-cad 프록시) - CAD 빌드에 공용 글꼴 복사 — Tailwind 가 url 을 고치지 않아 dist/assets 에서 찾던 404 - 시험 test_555_boot_loader_preview.py Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import { cpSync } from 'node:fs';
|
|
import { fileURLToPath } from 'node:url';
|
|
import react from '@vitejs/plugin-react-swc';
|
|
import { defineConfig, type Plugin } from 'vite';
|
|
import svgr from 'vite-plugin-svgr'; // https://vitejs.dev/config/
|
|
|
|
// 공용 글꼴(ui_template/fonts) — Tailwind 가 테마 css 를 끌어 붙이며 url(./noto-sans-kr-*.woff2)
|
|
// 를 고쳐 쓰지 않아 dist/assets 에서 찾음(555-3) · 그 자리에 파일을 둠.
|
|
const aisloFonts: Plugin = {
|
|
name: 'aislo-fonts',
|
|
apply: 'build',
|
|
writeBundle() {
|
|
cpSync(
|
|
fileURLToPath(new URL('../../ui_template/fonts', import.meta.url)),
|
|
fileURLToPath(new URL('./dist/assets', import.meta.url)),
|
|
{
|
|
recursive: true,
|
|
filter: (src) => !src.endsWith('.css'),
|
|
}
|
|
);
|
|
},
|
|
};
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), svgr(), aisloFonts],
|
|
base: './',
|
|
resolve: {
|
|
alias: {
|
|
// 알림은 부모 페이지 토스트로 넘긴다 — 호출부 30여 곳을 그대로 두려고
|
|
// 라이브러리 자리만 바꿔 끼운다(2026-08-30 사용자 지시).
|
|
'react-toastify': fileURLToPath(new URL('./src/helpers/toast-bridge.ts', import.meta.url)),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
},
|
|
});
|