mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-07-27 00:48:23 +08:00
fix(docs): add ssr.noExternal and upgrade vp-dynamic-nav to 0.0.3 (#27503)
VitePress externalizes node_modules during SSR, causing Node.js to try loading .vue source files directly and throw ERR_UNKNOWN_FILE_EXTENSION. Setting ssr.noExternal ensures Vite processes vp-dynamic-nav through its transform pipeline instead. vp-dynamic-nav 0.0.3 exports a vpDynamicNavPlugin() helper from the ./plugin subpath for consumers who prefer the programmatic approach. Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
This commit is contained in:
@@ -35,6 +35,9 @@ export default defineConfig({
|
||||
cleanUrls: true,
|
||||
|
||||
vite: {
|
||||
ssr: {
|
||||
noExternal: ["vp-dynamic-nav"],
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
// Open file locally via edit
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"medium-zoom": "^1.1.0",
|
||||
"open-editor": "^5.0.0",
|
||||
"vitepress": "^1.6.3",
|
||||
"vp-dynamic-nav": "^0.0.1",
|
||||
"vp-dynamic-nav": "0.0.3",
|
||||
"vue3-tabs-component": "^1.3.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1747,10 +1747,10 @@ vitepress@^1.6.3:
|
||||
vite "^5.4.14"
|
||||
vue "^3.5.13"
|
||||
|
||||
vp-dynamic-nav@^0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/vp-dynamic-nav/-/vp-dynamic-nav-0.0.1.tgz#4e3f803343d3457a262b5498b06ed2c6172da247"
|
||||
integrity sha512-7FnKerBRMsqfVLWKPrm7sFFhFIXEbMJY6X1HJ17CvrEacL1al1UXFfXcMB+Vi9o0xdHOMU0e7N6kQQXAfjyLRA==
|
||||
vp-dynamic-nav@0.0.3:
|
||||
version "0.0.3"
|
||||
resolved "https://registry.yarnpkg.com/vp-dynamic-nav/-/vp-dynamic-nav-0.0.3.tgz#2b796d1be069c502fc2e4b42fd4c1437c66b80b0"
|
||||
integrity sha512-qkDeki7TA21bhA12uiR0kEWZHVqeFusza3/XsGjD75Ht6qUoDOS/+YrCPyw9+6Zm+5/BvzK7j0jpDXPwW20m3g==
|
||||
|
||||
vue3-tabs-component@^1.3.7:
|
||||
version "1.3.7"
|
||||
|
||||
Reference in New Issue
Block a user