2024-11-06 09:03:08 +01:00
|
|
|
import { resolve } from 'path';
|
|
|
|
|
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
|
|
|
|
|
import react from '@vitejs/plugin-react';
|
2024-11-07 11:53:16 +01:00
|
|
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
2024-11-06 09:03:08 +01:00
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
main: {
|
2024-11-07 09:15:00 +01:00
|
|
|
plugins: [
|
|
|
|
|
externalizeDepsPlugin({
|
2024-11-07 09:32:26 +01:00
|
|
|
exclude: ['@colanode/core', '@colanode/crdt'],
|
2024-11-07 09:15:00 +01:00
|
|
|
}),
|
2024-11-07 11:53:16 +01:00
|
|
|
viteStaticCopy({
|
|
|
|
|
targets: [
|
|
|
|
|
{
|
|
|
|
|
src: 'assets/**/*',
|
|
|
|
|
dest: 'assets',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
}),
|
2024-11-07 09:15:00 +01:00
|
|
|
],
|
2024-11-06 09:03:08 +01:00
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
'@/main': resolve('src/main'),
|
|
|
|
|
'@/lib': resolve('src/lib'),
|
|
|
|
|
'@/types': resolve('src/types'),
|
|
|
|
|
'@/operations': resolve('src/operations'),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
preload: {
|
2024-11-07 09:32:26 +01:00
|
|
|
plugins: [
|
|
|
|
|
externalizeDepsPlugin({
|
|
|
|
|
exclude: ['@colanode/core', '@colanode/crdt'],
|
|
|
|
|
}),
|
|
|
|
|
],
|
2024-11-06 09:03:08 +01:00
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
'@/lib': resolve('src/lib'),
|
|
|
|
|
'@/types': resolve('src/types'),
|
|
|
|
|
'@/operations': resolve('src/operations'),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
renderer: {
|
|
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
'@/renderer': resolve('src/renderer'),
|
|
|
|
|
'@/lib': resolve('src/lib'),
|
|
|
|
|
'@/operations': resolve('src/operations'),
|
|
|
|
|
'@/types': resolve('src/types'),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
plugins: [react()],
|
|
|
|
|
},
|
|
|
|
|
});
|