import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import path from 'path' // Library mode: one prebuilt ESM chunk, published by CI and dropped onto the // operator's volume. The operator never builds anything (MODULE_SYSTEM.md §2.5). // // The four externals are the whole contract with core. Declaring them external // alone is not enough, though: rollup would emit bare `import 'react'` // specifiers, which a browser cannot resolve without an import map — and CSP // forbids the inline