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

* #213 web preview and cleanup native api integration * remove old tauri build implementation * fix git path --------- Co-authored-by: neil <neil@neils-MacBook-Pro.local>
41 lines
988 B
TypeScript
41 lines
988 B
TypeScript
import { sveltekit } from "@sveltejs/kit/vite";
|
|
import type { UserConfig } from "vite";
|
|
import path from "path";
|
|
|
|
const isMock = process.env.BUILD_FOR === "preview";
|
|
|
|
const config: UserConfig = {
|
|
plugins: [sveltekit()],
|
|
resolve: {
|
|
alias: {
|
|
"@tea/ui/*": path.resolve("../ui/src/*"),
|
|
// this dynamic-ish static importing is followed by the svelte build
|
|
// but for vscode editing intellisense tsconfig.json is being used
|
|
"@native": isMock
|
|
? path.resolve("src/libs/native-mock.ts")
|
|
: path.resolve("src/libs/native-electron.ts"),
|
|
$components: path.resolve("./src/components"),
|
|
$libs: path.resolve("./src/libs"),
|
|
$appcss: path.resolve("./src/app.css")
|
|
}
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
fs: {
|
|
allow: [".."]
|
|
}
|
|
},
|
|
test: {
|
|
// Jest like globals
|
|
globals: true,
|
|
environment: "jsdom",
|
|
include: ["src/**/*.{test,spec}.ts"],
|
|
// Extend jest-dom matchers
|
|
setupFiles: ["./setupTest.js"],
|
|
coverage: {
|
|
provider: "c8"
|
|
}
|
|
}
|
|
};
|
|
|
|
export default config;
|