Files
data-index-report/vite.config.ts
2026-05-18 13:52:47 +08:00

33 lines
780 B
TypeScript
Raw Permalink 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 { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { viteSingleFile } from "vite-plugin-singlefile"
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), viteSingleFile()],
base: './',
server: {
host: '0.0.0.0',
port: 5173,
proxy: {
'/api': {
target: 'http://localhost:3002',
changeOrigin: true,
secure: false,
}
}
},
build: {
assetsInlineLimit: 0, // 强制所有图片不转 base64直接走文件路径提高 html2canvas 稳定性
chunkSizeWarningLimit: 100000000,
cssCodeSplit: false,
assetsDir: 'assets',
rollupOptions: {
output: {
inlineDynamicImports: true,
manualChunks: undefined,
},
},
},
})