mirror of
https://github.com/heyman/heynote.git
synced 2025-06-24 19:41:30 +02:00
Reformat with tabsize 4
This commit is contained in:
parent
6dee4f81f2
commit
98f681bdb9
112
vite.config.ts
112
vite.config.ts
@ -12,60 +12,60 @@ const isProduction = process.env.NODE_ENV === "production"
|
|||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
electron([
|
electron([
|
||||||
{
|
{
|
||||||
// Main-Process entry file of the Electron App.
|
// Main-Process entry file of the Electron App.
|
||||||
entry: 'electron/main/index.ts',
|
entry: 'electron/main/index.ts',
|
||||||
onstart(options) {
|
onstart(options) {
|
||||||
if (process.env.VSCODE_DEBUG) {
|
if (process.env.VSCODE_DEBUG) {
|
||||||
console.log(/* For `.vscode/.debug.script.mjs` */'[startup] Electron App')
|
console.log(/* For `.vscode/.debug.script.mjs` */'[startup] Electron App')
|
||||||
} else {
|
} else {
|
||||||
options.startup()
|
options.startup()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
vite: {
|
vite: {
|
||||||
build: {
|
build: {
|
||||||
sourcemap: isDevelopment,
|
sourcemap: isDevelopment,
|
||||||
minify: isProduction,
|
minify: isProduction,
|
||||||
outDir: 'dist-electron/main',
|
outDir: 'dist-electron/main',
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
external: Object.keys("dependencies" in pkg ? pkg.dependencies : {}),
|
external: Object.keys("dependencies" in pkg ? pkg.dependencies : {}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
entry: 'electron/preload/index.ts',
|
entry: 'electron/preload/index.ts',
|
||||||
onstart(options) {
|
onstart(options) {
|
||||||
// Notify the Renderer-Process to reload the page when the Preload-Scripts build is complete,
|
// Notify the Renderer-Process to reload the page when the Preload-Scripts build is complete,
|
||||||
// instead of restarting the entire Electron App.
|
// instead of restarting the entire Electron App.
|
||||||
options.reload()
|
options.reload()
|
||||||
},
|
},
|
||||||
vite: {
|
vite: {
|
||||||
build: {
|
build: {
|
||||||
sourcemap: isDevelopment,
|
sourcemap: isDevelopment,
|
||||||
minify: isProduction,
|
minify: isProduction,
|
||||||
outDir: 'dist-electron/preload',
|
outDir: 'dist-electron/preload',
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
external: Object.keys("dependencies" in pkg ? pkg.dependencies : {}),
|
external: Object.keys("dependencies" in pkg ? pkg.dependencies : {}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
]),
|
]),
|
||||||
// Use Node.js API in the Renderer-process
|
// Use Node.js API in the Renderer-process
|
||||||
renderer({
|
renderer({
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
server: !!process.env.VSCODE_DEBUG ? (() => {
|
server: !!process.env.VSCODE_DEBUG ? (() => {
|
||||||
const url = new URL(pkg.debug.env.VITE_DEV_SERVER_URL)
|
const url = new URL(pkg.debug.env.VITE_DEV_SERVER_URL)
|
||||||
return {
|
return {
|
||||||
host: url.hostname,
|
host: url.hostname,
|
||||||
port: +url.port,
|
port: +url.port,
|
||||||
}
|
}
|
||||||
})() : undefined,
|
})() : undefined,
|
||||||
clearScreen: false,
|
clearScreen: false,
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user