2026-05-24 22:26:21 +08:00
|
|
|
import { defineConfig } from "vite";
|
2026-05-27 14:55:12 +08:00
|
|
|
import vue from "@vitejs/plugin-vue";
|
2026-05-24 22:26:21 +08:00
|
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
|
|
|
|
|
|
const here = fileURLToPath(new URL(".", import.meta.url));
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
2026-05-27 14:55:12 +08:00
|
|
|
plugins: [vue()],
|
2026-05-24 22:26:21 +08:00
|
|
|
build: {
|
|
|
|
|
target: "node22",
|
|
|
|
|
outDir: "dist",
|
|
|
|
|
emptyOutDir: true,
|
|
|
|
|
minify: false,
|
|
|
|
|
lib: {
|
|
|
|
|
entry: `${here}src/main.ts`,
|
|
|
|
|
formats: ["es"],
|
|
|
|
|
fileName: () => "agent.mjs",
|
|
|
|
|
},
|
|
|
|
|
rollupOptions: {
|
|
|
|
|
external: (id) => !id.startsWith(".") && !id.startsWith("/") && !id.startsWith("\0"),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|