26 lines
695 B
JavaScript
26 lines
695 B
JavaScript
// vite.config.js
|
|
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
root: 'frontend', // Vite가 frontend 폴더를 기준으로 빌드
|
|
publicDir: 'frontend/public',
|
|
build: {
|
|
outDir: 'frontend/dist',
|
|
emptyOutDir: true,
|
|
rollupOptions: {
|
|
input: {
|
|
main: path.resolve(__dirname, 'frontend/index.html')
|
|
}
|
|
}
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
strictPort: true,
|
|
host: 'localhost'
|
|
},
|
|
// Electron은 file:// 프로토콜 사용 → 상대 경로로 자산 로드
|
|
base: './'
|
|
}); |