mirror of
https://github.com/AmintaCCCP/GithubStarsManager.git
synced 2025-11-25 02:34:54 +08:00
25 lines
627 B
TypeScript
25 lines
627 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
base: './', // 使用相对路径,解决 Electron 白屏问题
|
|
optimizeDeps: {
|
|
exclude: ['lucide-react'],
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
assetsDir: 'assets',
|
|
// 确保资源文件使用相对路径
|
|
rollupOptions: {
|
|
output: {
|
|
// 简化文件名,避免复杂的哈希
|
|
entryFileNames: 'assets/[name].js',
|
|
chunkFileNames: 'assets/[name].js',
|
|
assetFileNames: 'assets/[name].[ext]'
|
|
}
|
|
}
|
|
}
|
|
});
|