12 lines
481 B
TypeScript
12 lines
481 B
TypeScript
import { defineConfig } from 'vite';
|
||
import react from '@vitejs/plugin-react';
|
||
import { viteSingleFile } from 'vite-plugin-singlefile';
|
||
|
||
// 构建成单个 index.html:本地服务直接托管现场主讲稿。
|
||
export default defineConfig({
|
||
root: new URL('.', import.meta.url).pathname,
|
||
plugins: [react(), viteSingleFile()],
|
||
server: { port: 5178, proxy: { '/api': 'http://127.0.0.1:8791' } },
|
||
build: { outDir: 'dist', emptyOutDir: true, chunkSizeWarningLimit: 4000 },
|
||
});
|