Files
imobiledevice.js/frontend/vite.config.ts
2026-03-03 10:12:22 +08:00

30 lines
694 B
TypeScript

import { defineConfig } from "vite"
import { dirname, resolve } from "node:path"
import { fileURLToPath } from "node:url"
const frontendDir = dirname(fileURLToPath(import.meta.url))
const repoRootDir = resolve(frontendDir, "..")
export default defineConfig({
server: {
fs: {
allow: [repoRootDir],
},
proxy: {
"/api": "http://localhost:8080",
"/wisp": { target: "ws://localhost:8080", ws: true },
},
},
resolve: {
preserveSymlinks: true,
},
optimizeDeps: {
include: ["webmuxd", "@lbr77/anisette-js/browser"],
},
build: {
commonjsOptions: {
include: [/node_modules/, /\/lib\/webmuxd\.js/, /\/lib\/core\/.*\.js/],
},
},
})