e8acf922de
Overview (exporter health, Playnite version, counts, sync, live SSE activity, and a first-run panel that names the exact ingest path the .pext writes to), Library (covers + per-game include toggles + why-not-synced), Settings (filters, art delivery, sync cadence, paths). Data layer is AtomHttpApi atoms derived from the shared contract; the whole thing runs with zero host against an in-browser mock transport with four scenarios, and Storybook renders the real pages on the same fixtures. CI now asserts the production bundle carries no fixture strings. Also: CI rebuilt for the workspace layout (one root install, per-package typecheck, publish from plugin/ on a v* tag) with the exporter job and `publish: needs [build, exporter]` unchanged; README rewritten around the three workspaces, with the ingest inbox explained as the load-bearing mechanism it is.
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
// Vite config for the plugin SPA. `base: "./"` because the console serves the built
|
|
// bundle from /plugin-ui/playnite/ — asset URLs must stay relative to survive the proxy.
|
|
// Dev has two modes (see src/mocks/): plain `bun run dev` runs entirely on fixtures,
|
|
// `bun run dev:live` proxies /api to the plugin's dev server (plugin/src/dev.ts, :5886).
|
|
|
|
import { fileURLToPath } from "node:url";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
|
|
export default defineConfig({
|
|
base: "./",
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) },
|
|
},
|
|
// Scan only the app entry — without this the dev dep-scanner also crawls any
|
|
// storybook-static/ build output sitting in the workspace and errors out.
|
|
optimizeDeps: { entries: ["index.html"] },
|
|
build: {
|
|
outDir: "../plugin/dist/ui",
|
|
emptyOutDir: true,
|
|
},
|
|
server: {
|
|
port: 5601,
|
|
...(process.env.VITE_API_MODE === "live"
|
|
? {
|
|
proxy: {
|
|
"/api": {
|
|
target: process.env.PLAYNITE_URL ?? "http://127.0.0.1:5886",
|
|
},
|
|
},
|
|
}
|
|
: {}),
|
|
},
|
|
});
|