FreeDATA/gui_vue/vite.config.ts

62 lines
1.4 KiB
TypeScript
Raw Normal View History

2023-09-02 11:37:03 +00:00
import { defineConfig } from 'vite'
import electron from 'vite-plugin-electron'
import renderer from 'vite-plugin-electron-renderer'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
2023-09-05 09:22:00 +00:00
build: {
minify: false
},
useEslint: false,
2023-09-02 11:37:03 +00:00
plugins: [
vue(),
electron([
2023-09-05 13:28:58 +00:00
2023-09-02 11:37:03 +00:00
{
// Main-Process entry file of the Electron App.
entry: 'electron/main.ts',
},
2023-09-05 13:28:58 +00:00
/*
2023-09-02 11:37:03 +00:00
{
2023-09-05 09:22:00 +00:00
// Daemon-Process entry file of the Electron App.
entry: 'electron/sock.js',
},
{
// Daemon-Process entry file of the Electron App.
entry: 'electron/daemon.js',
},
{
// Daemon-Process entry file of the Electron App.
entry: 'electron/freedata.js',
},
{
entry: 'electron/preload-main.js',
2023-09-02 11:37:03 +00:00
onstart(options) {
2023-09-05 09:22:00 +00:00
// Notify the Renderer-Process to reload the page when the Preload-Scripts build is complete,
2023-09-02 11:37:03 +00:00
// instead of restarting the entire Electron App.
options.reload()
},
},
2023-09-05 13:28:58 +00:00
*/
2023-09-05 09:22:00 +00:00
{
2023-09-05 13:28:58 +00:00
entry: 'electron/preload.ts',
2023-09-05 09:22:00 +00:00
onstart(options) {
// Notify the Renderer-Process to reload the page when the Preload-Scripts build is complete,
// instead of restarting the entire Electron App.
options.reload()
2023-09-05 13:28:58 +00:00
2023-09-05 09:22:00 +00:00
},
2023-09-05 13:28:58 +00:00
2023-09-05 09:22:00 +00:00
},
2023-09-05 13:28:58 +00:00
2023-09-05 09:22:00 +00:00
],
),
2023-09-02 11:37:03 +00:00
renderer(),
],
})