Files
colanode/apps/desktop/electron.vite.config.ts
2024-11-13 23:44:21 +01:00

50 lines
1.0 KiB
TypeScript

import { resolve } from 'path';
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
import react from '@vitejs/plugin-react';
import { viteStaticCopy } from 'vite-plugin-static-copy';
export default defineConfig({
main: {
plugins: [
externalizeDepsPlugin({
exclude: ['@colanode/core', '@colanode/crdt'],
}),
viteStaticCopy({
targets: [
{
src: 'assets/**/*',
dest: 'assets',
},
],
}),
],
resolve: {
alias: {
'@/main': resolve('src/main'),
'@/shared': resolve('src/shared'),
},
},
},
preload: {
plugins: [
externalizeDepsPlugin({
exclude: ['@colanode/core', '@colanode/crdt'],
}),
],
resolve: {
alias: {
'@/shared': resolve('src/shared'),
},
},
},
renderer: {
resolve: {
alias: {
'@/renderer': resolve('src/renderer'),
'@/shared': resolve('src/shared'),
},
},
plugins: [react()],
},
});