020fd0d85a
- basic-jsx: Counter + Clock with defineComponent() + JSX - basic-template: Counter + Clock with .vue SFC + <template> - Both demonstrate HMR via vue-tui dev - Fix vite-plugin: strip build.lib and external config for bundledDev, add node builtins resolveId to prevent browser-external shimming - Remove old hmr-demo example (superseded by basic-template) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
24 lines
562 B
TypeScript
24 lines
562 B
TypeScript
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"),
|
|
},
|
|
},
|
|
});
|