e07a87224d
Desktop Client Build / Resolve Build Metadata (push) Successful in 26s
Frontend CI / Frontend (push) Successful in 3m23s
Backend CI / Backend (push) Successful in 16m58s
Desktop Client Build / Build Desktop Client (push) Successful in 24m56s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 36s
- Introduced icon-color.svg featuring a colorful gradient design. - Added icon-with-title.svg that includes a title and multiple gradient elements.
106 lines
3.1 KiB
TypeScript
106 lines
3.1 KiB
TypeScript
import { resolve } from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
|
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
|
|
const rootDir = fileURLToPath(new URL('.', import.meta.url))
|
|
|
|
const workspacePackages = [
|
|
'@geo/shared-types',
|
|
'@geo/http-client',
|
|
'@geo/publisher-platforms',
|
|
'@geo/ui-shared',
|
|
]
|
|
|
|
const workspaceAliases = {
|
|
'@geo/shared-types': resolve(rootDir, '../../packages/shared-types/src/index.ts'),
|
|
'@geo/http-client': resolve(rootDir, '../../packages/http-client/src/index.ts'),
|
|
'@geo/publisher-platforms': resolve(rootDir, '../../packages/publisher-platforms/src/index.ts'),
|
|
'@geo/ui-shared': resolve(rootDir, '../../packages/ui-shared/src/index.ts'),
|
|
'@geo/ui-shared/tokens': resolve(rootDir, '../../packages/ui-shared/src/tokens/index.ts'),
|
|
'@geo/ui-shared/tokens.css': resolve(rootDir, '../../packages/ui-shared/src/tokens/index.css'),
|
|
}
|
|
|
|
export default defineConfig({
|
|
main: {
|
|
plugins: [externalizeDepsPlugin({ exclude: workspacePackages })],
|
|
build: {
|
|
sourcemap: 'hidden',
|
|
// Disable minification for the main process: the bundle is only loaded
|
|
// once on app startup so size is irrelevant, and minified short names
|
|
// break Playwright `page.evaluate` because the function is serialized
|
|
// via `.toString()` and helper identifiers (e.g. `__name` renamed to
|
|
// `FK`) become undefined in the browser context.
|
|
minify: false,
|
|
rollupOptions: {
|
|
input: {
|
|
bootstrap: resolve(rootDir, 'src/main/bootstrap.ts'),
|
|
},
|
|
output: {
|
|
format: 'cjs',
|
|
entryFileNames: '[name].cjs',
|
|
chunkFileNames: '[name]-[hash].cjs',
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@main': resolve(rootDir, 'src/main'),
|
|
...workspaceAliases,
|
|
},
|
|
},
|
|
},
|
|
preload: {
|
|
plugins: [externalizeDepsPlugin({ exclude: workspacePackages })],
|
|
build: {
|
|
sourcemap: 'hidden',
|
|
minify: false,
|
|
rollupOptions: {
|
|
input: {
|
|
bridge: resolve(rootDir, 'src/preload/bridge.ts'),
|
|
},
|
|
output: {
|
|
format: 'cjs',
|
|
entryFileNames: '[name].cjs',
|
|
chunkFileNames: '[name]-[hash].cjs',
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@preload': resolve(rootDir, 'src/preload'),
|
|
...workspaceAliases,
|
|
},
|
|
},
|
|
},
|
|
renderer: {
|
|
plugins: [
|
|
vue(),
|
|
Components({
|
|
dts: false,
|
|
resolvers: [
|
|
AntDesignVueResolver({
|
|
importStyle: false,
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
build: {
|
|
sourcemap: 'hidden',
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@renderer': resolve(rootDir, 'src/renderer'),
|
|
// Single source of truth for the brand mark; lives in public/ so the
|
|
// main process and electron-builder can read the same file.
|
|
'@brand-logo': resolve(rootDir, 'public/logo.svg'),
|
|
'@brand-logo-full': resolve(rootDir, 'public/icon-with-title.svg'),
|
|
...workspaceAliases,
|
|
},
|
|
},
|
|
},
|
|
})
|