paper-burner/vite.config.js

27 lines
682 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { resolve } from 'path';
// 可选的前端构建配置:不改变现有直出模式
// - 输入:根目录 index.html 与 admin/index.html
// - 输出dist/ (与生产无关,默认不被服务端使用)
// - 可选使用npm run dev:fe / build:fe / preview:fe
export default {
root: '.',
publicDir: 'public',
build: {
outDir: 'dist',
emptyOutDir: true,
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
// admin 入口已被 .vercelignore 排除,不参与 Vercel 构建
// admin: resolve(__dirname, 'admin/index.html'),
},
},
},
server: {
port: 5173,
open: false,
},
};