30 lines
633 B
JavaScript
30 lines
633 B
JavaScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import fs from 'fs';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 3000,
|
|
open: true,
|
|
// Enable HTTPS with self-signed certificate
|
|
https: {
|
|
key: fs.readFileSync('./localhost-key.pem'),
|
|
cert: fs.readFileSync('./localhost.pem'),
|
|
}
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
assetsDir: 'assets',
|
|
sourcemap: false,
|
|
minify: true,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
vendor: ['react', 'react-dom'],
|
|
nostr: ['nostr-tools']
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|