Files
clement-saillant-cc/vite.config.ts
T
L'électron rare 4436877e45 feat: semantic fallback page with rel=me injection
Add a Vite plugin that renders bio, links and greetings from the
Task 2 content modules into the raw served index.html at build
time, so non-JS clients (Mastodon's rel=me verifier included) see
real content and the mastodon.saillant.cc/@clement rel=me anchor.

Hide the fallback for sighted users once the 3D demo boots, but
keep it in the accessibility tree. Add @types/node so tsc can
type-check the node:fs import in the new test.
2026-07-09 11:12:28 +02:00

15 lines
366 B
TypeScript

import { defineConfig, type Plugin } from 'vite'
import react from '@vitejs/plugin-react'
import { renderFallbackHtml } from './src/fallback/inject'
function fallbackPlugin(): Plugin {
return {
name: 'inject-fallback',
transformIndexHtml: (html) => renderFallbackHtml(html),
}
}
export default defineConfig({
plugins: [react(), fallbackPlugin()],
})