Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/dev-vite-fs-allow.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions apps/site-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"version": "0.2.0",
"description": "Run one command, get a docs site: collects scattered repo docs and builds a static, searchable site.",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/losol/lectio-docs.git",
"directory": "apps/site-builder"
},
"type": "module",
"bin": {
"lectio": "./bin/lectio.mjs"
Expand Down
6 changes: 6 additions & 0 deletions apps/site-builder/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 } },
Comment on lines +6 to +11
});