feat(build): integrate frontend build into backend binary and update scripts

This commit is contained in:
2026-09-22 22:57:08 +08:00
parent 15144fb9d4
commit 4be6d2add0
15 changed files with 175 additions and 109 deletions
+10
View File
@@ -6,6 +6,16 @@ const BACKEND = process.env.NUKUMIZU_API || 'http://127.0.0.1:8080';
export default defineConfig({
plugins: [vue()],
build: {
// web/embed.go embeds this directory into the Go binary. It has to live
// inside the web package: go:embed cannot reach outside its own
// directory, so ../web/dist is as close as it gets.
outDir: '../web/dist',
// The directory is outside the project root, so Vite refuses to empty
// it unless told to. Without this, stale hashed assets from earlier
// builds pile up in the binary.
emptyOutDir: true
},
server: {
host: '0.0.0.0',
port: 5173,