Files
vue-tui/examples/basic-template/vite.config.ts
T

24 lines
562 B
TypeScript
Raw Normal View History

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