Protocol v1 (task → ready → result | failed with phase and kind), the worker entry with the glue bundled statically and the page's compiled Module posted, the file streamed into the module's memory; client with start and task timers (paused while hidden), settle-once, terminate always, error events never masked; module-level controller (one import at a time, cancel on leaving Home, worker chunk prefetched once the engine is loaded); the settlement mapped to the B.1.8 messages (OD-5: a trap, a timeout or an unreadable file is « Erreur de lecture du PDF. », never a corrupt PDF). HomeRoute keeps its routing and size pre-checks, loads its own index after acceptance, drops a result when the session changed. Tests: handler and client in-process, the corpus message test (O8 51, O7 stored inputs, O2/O3/Step 5), the six existing suites migrated to the real worker logic.
42 lines
975 B
TypeScript
42 lines
975 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react-swc'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import { resolve } from 'path'
|
|
import {
|
|
faunosteoSheetBundle,
|
|
resolveSheetBundleMode,
|
|
} from './vite/sheet-bundle'
|
|
|
|
/** Generated seed of the reference equine sheet (pnpm import:equine). */
|
|
export const EQUINE_SEED_DIR = resolve(
|
|
__dirname,
|
|
'../../supabase/seed/anatomical-sheets/equine/draft',
|
|
)
|
|
|
|
export default defineConfig(({ command }) => ({
|
|
plugins: [
|
|
tailwindcss(),
|
|
react(),
|
|
faunosteoSheetBundle({
|
|
mode: resolveSheetBundleMode(process.env, command),
|
|
seedDir: EQUINE_SEED_DIR,
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
server: {
|
|
host: true,
|
|
port: 5173,
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
sourcemap: false,
|
|
},
|
|
// The import worker (R4.3) is a module worker: the core glue it bundles is ESM.
|
|
worker: { format: 'es' },
|
|
}))
|