55 lines
1.0 KiB
TypeScript
55 lines
1.0 KiB
TypeScript
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import { resolve } from 'path'
|
|
|
|
export default defineConfig({
|
|
main: {
|
|
plugins: [externalizeDepsPlugin()],
|
|
resolve: {
|
|
alias: {
|
|
'@shared': resolve('shared'),
|
|
'@electron': resolve('electron')
|
|
}
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: resolve('electron/main.ts')
|
|
},
|
|
rollupOptions: {
|
|
external: []
|
|
}
|
|
}
|
|
},
|
|
preload: {
|
|
plugins: [externalizeDepsPlugin()],
|
|
resolve: {
|
|
alias: {
|
|
'@shared': resolve('shared')
|
|
}
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: resolve('electron/preload.ts')
|
|
}
|
|
}
|
|
},
|
|
renderer: {
|
|
root: resolve('src'),
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve('src'),
|
|
'@shared': resolve('shared')
|
|
}
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
index: resolve('src/index.html')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|