mirror of
https://github.com/ivabus/gui
synced 2025-04-23 22:17:18 +03:00

* #232 initialize sentry * gha: update get platform job --------- Co-authored-by: neil <neil@neils-MacBook-Pro.local>
49 lines
841 B
JavaScript
49 lines
841 B
JavaScript
import { join } from "path";
|
|
import { viteStaticCopy } from "vite-plugin-static-copy";
|
|
|
|
const PACKAGE_ROOT = __dirname;
|
|
const PROJECT_ROOT = join(PACKAGE_ROOT, "../..");
|
|
|
|
/**
|
|
* @type {import('vite').UserConfig}
|
|
* @see https://vitejs.dev/config/
|
|
*/
|
|
const config = {
|
|
root: PACKAGE_ROOT,
|
|
envDir: PROJECT_ROOT,
|
|
resolve: {
|
|
alias: {
|
|
"/@/": join(PACKAGE_ROOT, "src") + "/"
|
|
}
|
|
},
|
|
build: {
|
|
ssr: true,
|
|
sourcemap: "inline",
|
|
outDir: "dist",
|
|
assetsDir: ".",
|
|
minify: process.env.MODE !== "development",
|
|
lib: {
|
|
entry: "electron.ts",
|
|
formats: ["cjs"]
|
|
},
|
|
rollupOptions: {
|
|
output: {
|
|
entryFileNames: "[name].cjs"
|
|
}
|
|
},
|
|
emptyOutDir: true,
|
|
reportCompressedSize: false
|
|
},
|
|
plugins: [
|
|
viteStaticCopy({
|
|
targets: [
|
|
{
|
|
src: "./preload.cjs",
|
|
dest: "."
|
|
}
|
|
]
|
|
})
|
|
]
|
|
};
|
|
|
|
export default config;
|