36 lines
787 B
TypeScript
36 lines
787 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
base: './',
|
|
build: {
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
target: 'esnext',
|
|
rollupOptions: {
|
|
external: ['electron', 'electron-store', ...Object.keys(require('./package.json').dependencies)],
|
|
output: {
|
|
format: 'es',
|
|
entryFileNames: '[name].js',
|
|
chunkFileNames: '[name].js',
|
|
assetFileNames: '[name][extname]'
|
|
}
|
|
},
|
|
assetsInlineLimit: 0,
|
|
minify: 'esbuild',
|
|
sourcemap: true
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5174,
|
|
},
|
|
clearScreen: false,
|
|
});
|