mirror of
https://github.com/ow-mods/ow-mod-man.git
synced 2025-12-11 20:15:50 +01:00
44 lines
1.6 KiB
TypeScript
44 lines
1.6 KiB
TypeScript
/// <reference types="vite/client" />
|
|
|
|
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { imagetools } from "vite-imagetools";
|
|
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
publicDir: false,
|
|
clearScreen: false,
|
|
server: {
|
|
strictPort: true,
|
|
watch: {
|
|
ignored: ["owmods_gui/backend/target/**"]
|
|
}
|
|
},
|
|
envPrefix: ["VITE_", "TAURI_ENV_"],
|
|
plugins: [react(), imagetools()],
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
main: path.resolve(__dirname, "./index.html"),
|
|
logs: path.resolve(__dirname, "./logs/index.html")
|
|
}
|
|
},
|
|
outDir: "../dist",
|
|
target: process.env.TAURI_ENV_PLATFORM == "windows" ? "chrome105" : "safari13",
|
|
minify: !process.env.TAURI_ENV_DEBUG ? "esbuild" : false,
|
|
sourcemap: !!process.env.TAURI_ENV_DEBUG
|
|
},
|
|
resolve: {
|
|
alias: [
|
|
{ find: "@components", replacement: path.resolve(__dirname, "./src/components") },
|
|
{ find: "@styles", replacement: path.resolve(__dirname, "./src/styles") },
|
|
{ find: "@assets", replacement: path.resolve(__dirname, "./src/assets") },
|
|
{ find: "@types", replacement: path.resolve(__dirname, "./src/types.d.ts") },
|
|
{ find: "@hooks", replacement: path.resolve(__dirname, "./src/hooks.ts") },
|
|
{ find: "@commands", replacement: path.resolve(__dirname, "./src/commands.ts") },
|
|
{ find: "@events", replacement: path.resolve(__dirname, "./src/events.ts") }
|
|
]
|
|
}
|
|
});
|