Files
md_to_gost/desktop/electron.vite.config.ts
T
Igor20264 8223e0ac14
Example document / build (push) Has been cancelled
Python application / build (push) Has been cancelled
v0.6.0 BigUpdate
2026-10-20 11:38:06 +03:00

33 lines
822 B
TypeScript

import { resolve } from 'node:path'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()],
},
preload: {
plugins: [externalizeDepsPlugin()],
// CJS, не ESM: Electron дважды выполняет ESM-preload, и contextBridge падает.
build: {
rollupOptions: {
output: {
format: 'cjs',
inlineDynamicImports: true,
entryFileNames: 'index.cjs',
},
},
},
},
renderer: {
resolve: {
alias: {
'@renderer': resolve('src/renderer/src'),
'@shared': resolve('src/shared'),
},
},
plugins: [react(), tailwindcss()],
},
})