memlnaut-nisps/playground/vite.config.ts
w1n5t0n a160b72295 feat(playground): scaffold vite + solid + ts
Fresh playground/ now sits on:
- Vite 5 + vite-plugin-solid + Solid.js 1.9
- TypeScript strict (jsx preserve, target ES2022)
- index.html → main.tsx → App.tsx with a tiny pushState/popstate router
- Design tokens (dark immersive palette, JetBrains Mono) at src/styles/tokens.css
- COOP/COEP headers in vite.config.ts (server + preview) so SharedArrayBuffer
  is available for the C15 + AudioWorklet wiring stream 7 will land.
- Debug-probe stub at src/debug/probe.ts: window.__nisps with placeholder
  methods + __ready=false marker. Stream 10 fills it in. Keeping the install
  point stable from day one means Playwright tests can rely on the global
  existing.

Stores, pipelines, and primitives ride in the next commits.

Stream 8 of the rewrite (meml-911).
2026-04-29 15:37:23 +03:00

25 lines
622 B
TypeScript

import { defineConfig } from 'vite';
import solid from 'vite-plugin-solid';
// COOP/COEP headers are required for SharedArrayBuffer (used by C15 + AudioWorklet).
// Set on both dev server and the production preview.
const crossOriginIsolationHeaders = {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp',
};
export default defineConfig({
plugins: [solid()],
server: {
port: 5173,
headers: crossOriginIsolationHeaders,
},
preview: {
port: 4173,
headers: crossOriginIsolationHeaders,
},
build: {
target: 'es2022',
sourcemap: true,
},
});