Skip to content
Open
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
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@iconify/vue": "^5.0.1",
"@shikijs/vitepress-twoslash": "^4.4.1",
"@types/express": "^5.0.6",
"@voidzero-dev/vitepress-theme": "^5.0.6",
"@voidzero-dev/vitepress-theme": "5.0.4",
"feed": "^6.0.0",
"markdown-it-image-size": "^15.2.0",
"oxc-minify": "^0.142.0",
Expand Down
27 changes: 27 additions & 0 deletions patches/vitepress.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/dist/client/app/ssr.js b/dist/client/app/ssr.js
index ca8086dc0ec91b10abf8fcecf0e513fe819db9a9..b28a2bbf31e33ad232620feaec588eb94c76ee71 100644
--- a/dist/client/app/ssr.js
+++ b/dist/client/app/ssr.js
@@ -5,6 +5,22 @@ export async function render(path) {
const { app, router } = await createApp();
await router.go(path);
const ctx = { content: '', vpSocialIcons: new Set() };
+ const errors = [];
+ const userErrorHandler = app.config.errorHandler
+ app.config.errorHandler = (err, instance, info) => {
+ errors.push([err, info])
+ userErrorHandler?.(err, instance, info)
+ }
ctx.content = await renderToString(app, ctx);
+ if (errors.length) {
+ const details = errors
+ .map(([err, info]) =>
+ err instanceof Error
+ ? `[${info}] ${err.stack || err.message}`
+ : `[${info}] ${String(err)}`
+ )
+ .join('\n')
+ throw new Error(`Errors during SSR rendering of ${path}:\n${details}`)
+ }
return ctx;
}
23 changes: 13 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 38 additions & 37 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,61 +3,62 @@ packages:
- 'playground/**'
- 'packages/**/__tests__/**'
- docs

hoistPattern:
- postcss # package/vite
- pug # playground/tailwind: @vue/compiler-sfc
- eslint-import-resolver-* # eslint-plugin-import-x
shellEmulator: true
autoInstallPeers: false
dedupeInjectedDeps: false
overrides:
rolldown: $rolldown
vite: 'workspace:*'
debug: 'npm:obug@^1.0.2'
patchedDependencies:
"sirv@3.0.2": "patches/sirv@3.0.2.patch"
"chokidar@3.6.0": "patches/chokidar@3.6.0.patch"
"dotenv-expand@13.0.0": "patches/dotenv-expand@13.0.0.patch"
peerDependencyRules:
allowedVersions:
vite: "*"
packageExtensions:
sass-embedded:
peerDependencies:
source-map-js: "*"
peerDependenciesMeta:
source-map-js:
optional: true
'@rollup/plugin-dynamic-import-vars':
dependencies:
'@types/estree': ^1.0.0
'@volar/typescript':
dependencies:
'@volar/language-service': 2.4.28
allowBuilds:
core-js: false
vue-demi: false
"@parcel/watcher": true
"@tailwindcss/oxide": true
core-js: false
esbuild: true
playwright-chromium: true
sharp: true
simple-git-hooks: true
unrs-resolver: true
vue-demi: false
workerd: true
autoInstallPeers: false
blockExoticSubdeps: true
dedupeInjectedDeps: false

dedupePeers: true

hoistPattern:
- postcss # package/vite
- pug # playground/tailwind: @vue/compiler-sfc
- eslint-import-resolver-* # eslint-plugin-import-x

minimumReleaseAge: 1440
minimumReleaseAgeExclude:
- rolldown
- '@rolldown/binding-*'
- '@voidzero-dev/vitepress-theme@5.0.6'
blockExoticSubdeps: true
overrides:
debug: 'npm:obug@^1.0.2'
rolldown: $rolldown
vite: 'workspace:*'
packageExtensions:
'@rollup/plugin-dynamic-import-vars':
dependencies:
'@types/estree': ^1.0.0
'@volar/typescript':
dependencies:
'@volar/language-service': 2.4.28
sass-embedded:
peerDependencies:
source-map-js: "*"
peerDependenciesMeta:
source-map-js:
optional: true
patchedDependencies:
"chokidar@3.6.0": "patches/chokidar@3.6.0.patch"
"dotenv-expand@13.0.0": "patches/dotenv-expand@13.0.0.patch"
"sirv@3.0.2": "patches/sirv@3.0.2.patch"
vitepress: patches/vitepress.patch
peerDependencyRules:
allowedVersions:
vite: "*"
shellEmulator: true
trustPolicy: no-downgrade
trustPolicyExclude:
- chokidar@4.0.3 # https://github.com/paulmillr/chokidar/issues/1440
- semver@5.7.2 || 6.3.1
- tailwindcss@3.4.18
- undici-types@6.21.0 # https://github.com/nodejs/undici/issues/4666

dedupePeers: true
18 changes: 18 additions & 0 deletions scripts/test-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
# Run docs build and fail if there are SSR errors in the output.
# Vue SSR silently swallows component render errors via handleError (console.warn),
# so vitepress build exits 0 even when pages are broken. This script catches that.
set -e

LOG_FILE=$(mktemp)
trap 'rm -f "$LOG_FILE"' EXIT

pnpm run docs-build 2>&1 | tee "$LOG_FILE"

if grep -qE '^(TypeError|Error|ReferenceError|SyntaxError):' "$LOG_FILE"; then
echo ""
echo "ERROR: SSR errors detected during docs build. See output above."
echo " Vue SSR silently swallows component errors, so the build exits 0"
echo " even when pages render incorrectly."
exit 1
fi
Loading