From 98f681bdb98d010041ca25f95e1dd4258a684b32 Mon Sep 17 00:00:00 2001 From: Jonatan Heyman Date: Sat, 14 Jan 2023 19:51:40 +0100 Subject: [PATCH] Reformat with tabsize 4 --- vite.config.ts | 112 ++++++++++++++++++++++++------------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index ab8c996..22a3228 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -12,60 +12,60 @@ const isProduction = process.env.NODE_ENV === "production" // https://vitejs.dev/config/ export default defineConfig({ - plugins: [ - vue(), - electron([ - { - // Main-Process entry file of the Electron App. - entry: 'electron/main/index.ts', - onstart(options) { - if (process.env.VSCODE_DEBUG) { - console.log(/* For `.vscode/.debug.script.mjs` */'[startup] Electron App') - } else { - options.startup() - } - }, - vite: { - build: { - sourcemap: isDevelopment, - minify: isProduction, - outDir: 'dist-electron/main', - rollupOptions: { - external: Object.keys("dependencies" in pkg ? pkg.dependencies : {}), - }, - }, - }, - }, - { - entry: 'electron/preload/index.ts', - 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() - }, - vite: { - build: { - sourcemap: isDevelopment, - minify: isProduction, - outDir: 'dist-electron/preload', - rollupOptions: { - external: Object.keys("dependencies" in pkg ? pkg.dependencies : {}), - }, - }, - }, - } - ]), - // Use Node.js API in the Renderer-process - renderer({ - nodeIntegration: true, - }), - ], - server: !!process.env.VSCODE_DEBUG ? (() => { - const url = new URL(pkg.debug.env.VITE_DEV_SERVER_URL) - return { - host: url.hostname, - port: +url.port, - } - })() : undefined, - clearScreen: false, + plugins: [ + vue(), + electron([ + { + // Main-Process entry file of the Electron App. + entry: 'electron/main/index.ts', + onstart(options) { + if (process.env.VSCODE_DEBUG) { + console.log(/* For `.vscode/.debug.script.mjs` */'[startup] Electron App') + } else { + options.startup() + } + }, + vite: { + build: { + sourcemap: isDevelopment, + minify: isProduction, + outDir: 'dist-electron/main', + rollupOptions: { + external: Object.keys("dependencies" in pkg ? pkg.dependencies : {}), + }, + }, + }, + }, + { + entry: 'electron/preload/index.ts', + 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() + }, + vite: { + build: { + sourcemap: isDevelopment, + minify: isProduction, + outDir: 'dist-electron/preload', + rollupOptions: { + external: Object.keys("dependencies" in pkg ? pkg.dependencies : {}), + }, + }, + }, + } + ]), + // Use Node.js API in the Renderer-process + renderer({ + nodeIntegration: true, + }), + ], + server: !!process.env.VSCODE_DEBUG ? (() => { + const url = new URL(pkg.debug.env.VITE_DEV_SERVER_URL) + return { + host: url.hostname, + port: +url.port, + } + })() : undefined, + clearScreen: false, })