Files
ruvnet--RuView/dashboard/vite.config.ts
T
rUv 7f5a692632 feat(nvsim): full simulator stack — Rust crate, dashboard, server, App Store, Ghost Murmur [ADR-089/090/091/092/093]
Squashed merge of feat/nvsim-pipeline-simulator (29 commits).

## Shipped

- ADR-089 nvsim crate (Accepted) — 50/50 tests, ~4.5 M samples/s, pinned witness cc8de9b01b0ff5bd…
- ADR-092 dashboard implementation (Implemented) — 8/12 §11 gates , 4/12 ⚠ (external infra)
- ADR-093 dashboard gap analysis (Implemented) — 21/21 catalogued gaps closed
- Plus ADR-090 (proposed conditional) and ADR-091 (proposed research-only)

## Live deploy
https://ruvnet.github.io/RuView/nvsim/

## Infra

- nvsim-server Dockerfile + GHCR publish workflow (.github/workflows/nvsim-server-docker.yml)
- axe-core + Playwright cross-browser CI (.github/workflows/dashboard-a11y.yml)
- gh-pages auto-deploy workflow already in place (preserves observatory + pose-fusion siblings)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-27 12:41:01 -04:00

81 lines
2.1 KiB
TypeScript

import { defineConfig } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
// Dashboard for ADR-092 — Vite + Lit + WASM in a Web Worker.
// Hosted at /RuView/nvsim/ on GitHub Pages; base path is configurable
// via NVSIM_BASE so local dev (npm run dev) stays at "/".
const base = (globalThis as { process?: { env?: { NVSIM_BASE?: string } } }).process?.env?.NVSIM_BASE ?? '/';
export default defineConfig({
base,
publicDir: 'public',
worker: {
format: 'es',
},
plugins: [
VitePWA({
registerType: 'autoUpdate',
includeAssets: [
'nvsim-pkg/nvsim.js',
'nvsim-pkg/nvsim_bg.wasm',
],
manifest: {
name: 'nvsim — NV-Diamond Magnetometer Simulator',
short_name: 'nvsim',
description: 'Deterministic forward simulator for NV-diamond magnetometry. WASM-backed CW-ODMR pipeline with witness-grade SHA-256 proofs.',
theme_color: '#0d1117',
background_color: '#0d1117',
display: 'standalone',
scope: base,
start_url: base,
icons: [
{
src: 'icon-192.svg',
sizes: '192x192',
type: 'image/svg+xml',
purpose: 'any maskable',
},
{
src: 'icon-512.svg',
sizes: '512x512',
type: 'image/svg+xml',
purpose: 'any maskable',
},
],
},
workbox: {
globPatterns: ['**/*.{js,css,html,svg,wasm,woff,woff2}'],
// WASM is large; bump the precache size budget so workbox doesn't
// skip nvsim_bg.wasm.
maximumFileSizeToCacheInBytes: 8 * 1024 * 1024,
},
devOptions: {
enabled: false,
},
}),
],
build: {
target: 'es2022',
sourcemap: true,
rollupOptions: {
output: {
manualChunks: {
lit: ['lit'],
signals: ['@preact/signals-core'],
},
},
},
},
server: {
port: 5173,
strictPort: true,
fs: {
allow: ['..', '.'],
},
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp',
},
},
});