diff --git a/.changeset/dev-vite-fs-allow.md b/.changeset/dev-vite-fs-allow.md new file mode 100644 index 0000000..9e057aa --- /dev/null +++ b/.changeset/dev-vite-fs-allow.md @@ -0,0 +1,7 @@ +--- +"lectio-docs": patch +--- + +Fix `lectio dev` rendering a blank page when run via `npx` (or any install where +dependencies resolve outside the site dir). The materialized dev server now lets +Vite read the symlinked dependencies, so React Router's client entry loads. diff --git a/apps/site-builder/vite.config.ts b/apps/site-builder/vite.config.ts index 68ba30d..2b5356b 100644 --- a/apps/site-builder/vite.config.ts +++ b/apps/site-builder/vite.config.ts @@ -3,4 +3,10 @@ import { defineConfig } from 'vite'; export default defineConfig({ plugins: [reactRouter()], + // The `lectio` CLI symlinks the site's dependencies in from wherever the + // package was installed (npx cache, pnpm store, …), whose realpaths sit + // outside the materialized site dir. Let the dev server read them — otherwise + // React Router's default client entry can't load and the page renders blank. + // Dev-server only; the static build is unaffected. + server: { fs: { strict: false } }, });