- Add Dockerfile.buttplug: builds Rust/WASM + TS, serves via nginx - Add nginx.buttplug.conf: serves /dist and /wasm with correct MIME types - Add .gitea/workflows/docker-build-buttplug.yml: path-filtered CI workflow - Strip Rust toolchain and buttplug build from frontend Dockerfile - Move buttplug to devDependencies (types only at build time) - Remove vite-plugin-wasm from frontend (WASM now served by nginx) - Add /buttplug proxy in vite.config (dev: localhost:8080) - Add buttplug service to compose.yml - Load buttplug dynamically in play page via runtime import - Fix faq page: suppress no-unnecessary-state-wrap for reassigned SvelteSet Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
823 B
TypeScript
34 lines
823 B
TypeScript
import path from "path";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import { defineConfig } from "vite";
|
|
import { sveltekit } from "@sveltejs/kit/vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [sveltekit(), tailwindcss()],
|
|
resolve: {
|
|
alias: { $lib: path.resolve("./src/lib"), "@": path.resolve("./src/lib") },
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
external: ["@sexy.pivoine.art/buttplug"],
|
|
},
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
"/api": {
|
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
target: "http://localhost:4000",
|
|
changeOrigin: true,
|
|
secure: false,
|
|
ws: true,
|
|
},
|
|
"/buttplug": {
|
|
rewrite: (path) => path.replace(/^\/buttplug/, ""),
|
|
target: "http://localhost:8080",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
});
|