22 lines
532 B
TypeScript
22 lines
532 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
server: {
|
|
port: 5173,
|
|
strictPort: true, // Fail if 5173 is in use. Electron NEEDS this exact port.
|
|
},
|
|
define: {
|
|
// Crucial for PouchDB to not crash in the browser
|
|
global: 'window',
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
// Force Vite to use the installed npm package for 'events'
|
|
events: 'events',
|
|
},
|
|
},
|
|
});
|