2025-02-04 01:30:36 -05:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
import path from 'path';
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
|
|
|
plugins: [react()],
|
2025-02-04 12:45:17 -05:00
|
|
|
base: process.env.ELECTRON_VITE_DEV_SERVER_URL ? '/' : './',
|
2025-02-04 01:30:36 -05:00
|
|
|
build: {
|
|
|
|
outDir: 'dist',
|
|
|
|
emptyOutDir: true,
|
|
|
|
target: 'esnext',
|
|
|
|
rollupOptions: {
|
|
|
|
external: ['http', 'https', 'path', 'fs', 'electron']
|
2025-02-04 12:45:17 -05:00
|
|
|
},
|
|
|
|
assetsDir: '.',
|
|
|
|
minify: true,
|
|
|
|
sourcemap: false
|
2025-02-04 01:30:36 -05:00
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@': path.resolve(__dirname, './src'),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
server: {
|
|
|
|
port: 5174,
|
|
|
|
},
|
|
|
|
clearScreen: false,
|
|
|
|
});
|