mirror of
https://github.com/usestrix/strix.git
synced 2026-09-14 14:19:09 +08:00
22 lines
649 B
TypeScript
22 lines
649 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import { fileURLToPath, URL } from "node:url";
|
|
|
|
// The viewer is served as static files by a stdlib Python server on an
|
|
// arbitrary ephemeral port, so all asset URLs must be relative (base: "./").
|
|
// The build output is committed at strix/interface/viewer/static and shipped.
|
|
export default defineConfig({
|
|
base: "./",
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "../static",
|
|
emptyOutDir: true,
|
|
},
|
|
});
|