vitepress 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client/app/index.js
CHANGED
|
@@ -94,18 +94,12 @@ function newApp() {
|
|
|
94
94
|
}
|
|
95
95
|
function newRouter() {
|
|
96
96
|
let isInitialPageLoad = inBrowser;
|
|
97
|
-
let initialPath;
|
|
98
97
|
return createRouter((path) => {
|
|
99
98
|
let pageFilePath = pathToFile(path);
|
|
100
99
|
let pageModule = null;
|
|
101
100
|
if (pageFilePath) {
|
|
101
|
+
// use lean build if this is the initial page load
|
|
102
102
|
if (isInitialPageLoad) {
|
|
103
|
-
initialPath = pageFilePath;
|
|
104
|
-
}
|
|
105
|
-
// use lean build if this is the initial page load or navigating back
|
|
106
|
-
// to the initial loaded path (the static vnodes already adopted the
|
|
107
|
-
// static content on that load so no need to re-fetch the page)
|
|
108
|
-
if (isInitialPageLoad || initialPath === pageFilePath) {
|
|
109
103
|
pageFilePath = pageFilePath.replace(/\.js$/, '.lean.js');
|
|
110
104
|
}
|
|
111
105
|
if (import.meta.env.DEV) {
|
|
@@ -44865,7 +44865,7 @@ const webFontsPlugin = (enabled = false) => ({
|
|
|
44865
44865
|
|
|
44866
44866
|
const themeRE = /\/\.vitepress\/theme\/index\.(m|c)?(j|t)s$/;
|
|
44867
44867
|
const hashRE = /\.([-\w]+)\.js$/;
|
|
44868
|
-
const staticInjectMarkerRE = /\
|
|
44868
|
+
const staticInjectMarkerRE = /\bcreateStaticVNode\((?:(".*")|('.*')), (\d+)\)/g;
|
|
44869
44869
|
const staticStripRE = /['"`]__VP_STATIC_START__[^]*?__VP_STATIC_END__['"`]/g;
|
|
44870
44870
|
const staticRestoreRE = /__VP_STATIC_(START|END)__/g;
|
|
44871
44871
|
const scriptClientRE = /<script\b[^>]*client\b[^>]*>([^]*?)<\/script>/;
|
|
@@ -45088,10 +45088,11 @@ async function createVitePressPlugin(siteConfig, ssr = false, pageToHashMap, cli
|
|
|
45088
45088
|
},
|
|
45089
45089
|
renderChunk(code, chunk) {
|
|
45090
45090
|
if (!ssr && isPageChunk(chunk)) {
|
|
45091
|
-
code = code.replace(
|
|
45092
|
-
|
|
45093
|
-
|
|
45094
|
-
|
|
45091
|
+
code = code.replace(staticInjectMarkerRE, (_, str1, str2, flag) => {
|
|
45092
|
+
const str = str1 || str2;
|
|
45093
|
+
const quote = str[0];
|
|
45094
|
+
return `createStaticVNode(${quote}__VP_STATIC_START__${str.slice(1, -1)}__VP_STATIC_END__${quote}, ${flag})`;
|
|
45095
|
+
});
|
|
45095
45096
|
return code;
|
|
45096
45097
|
}
|
|
45097
45098
|
return null;
|
|
@@ -49368,7 +49369,7 @@ async function generateSitemap(siteConfig) {
|
|
|
49368
49369
|
});
|
|
49369
49370
|
}
|
|
49370
49371
|
|
|
49371
|
-
var version = "1.6.
|
|
49372
|
+
var version = "1.6.2";
|
|
49372
49373
|
|
|
49373
49374
|
async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags, usedIcons) {
|
|
49374
49375
|
const routePath = `/${page.replace(/\.md$/, "")}`;
|
package/dist/node/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getDefaultExportFromCjs, u as c, n as disposeMdItInstance, v as clearCache, l as init, b as build, o as serve, w as version, q as createServer } from './chunk-
|
|
1
|
+
import { t as getDefaultExportFromCjs, u as c, n as disposeMdItInstance, v as clearCache, l as init, b as build, o as serve, w as version, q as createServer } from './chunk-BuJ66qxQ.js';
|
|
2
2
|
import { createLogger } from 'vite';
|
|
3
3
|
import 'node:path';
|
|
4
4
|
import 'node:url';
|
package/dist/node/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizePath } from 'vite';
|
|
2
2
|
export { loadEnv } from 'vite';
|
|
3
|
-
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, p as postcssPrefixSelector } from './chunk-
|
|
4
|
-
export { S as ScaffoldThemeType, b as build, q as createServer, a as defineConfig, e as defineConfigWithTheme, d as defineLoader, n as disposeMdItInstance, l as init, i as mergeConfig, r as resolveConfig, k as resolvePages, j as resolveSiteData, h as resolveUserConfig, s as scaffold, o as serve } from './chunk-
|
|
3
|
+
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, p as postcssPrefixSelector } from './chunk-BuJ66qxQ.js';
|
|
4
|
+
export { S as ScaffoldThemeType, b as build, q as createServer, a as defineConfig, e as defineConfigWithTheme, d as defineLoader, n as disposeMdItInstance, l as init, i as mergeConfig, r as resolveConfig, k as resolvePages, j as resolveSiteData, h as resolveUserConfig, s as scaffold, o as serve } from './chunk-BuJ66qxQ.js';
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import 'node:crypto';
|
|
7
7
|
import 'node:module';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitepress",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Vite & Vue powered static site generator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"*": "prettier --write --ignore-unknown"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@docsearch/css": "^3.8.
|
|
61
|
-
"@docsearch/js": "^3.8.
|
|
62
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
63
|
-
"@shikijs/core": "^2.
|
|
64
|
-
"@shikijs/transformers": "^2.
|
|
65
|
-
"@shikijs/types": "^2.
|
|
60
|
+
"@docsearch/css": "^3.8.3",
|
|
61
|
+
"@docsearch/js": "^3.8.3",
|
|
62
|
+
"@iconify-json/simple-icons": "^1.2.21",
|
|
63
|
+
"@shikijs/core": "^2.1.0",
|
|
64
|
+
"@shikijs/transformers": "^2.1.0",
|
|
65
|
+
"@shikijs/types": "^2.1.0",
|
|
66
66
|
"@types/markdown-it": "^14.1.2",
|
|
67
67
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
68
68
|
"@vue/devtools-api": "^7.7.0",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"focus-trap": "^7.6.4",
|
|
73
73
|
"mark.js": "8.11.1",
|
|
74
74
|
"minisearch": "^7.1.1",
|
|
75
|
-
"shiki": "^2.
|
|
76
|
-
"vite": "^5.4.
|
|
75
|
+
"shiki": "^2.1.0",
|
|
76
|
+
"vite": "^5.4.14",
|
|
77
77
|
"vue": "^3.5.13"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"synckit": "^0.9.2",
|
|
149
149
|
"tinyglobby": "^0.2.10",
|
|
150
150
|
"typescript": "^5.7.3",
|
|
151
|
-
"vitest": "^3.0.
|
|
151
|
+
"vitest": "^3.0.3",
|
|
152
152
|
"vue-tsc": "^2.2.0",
|
|
153
153
|
"wait-on": "^8.0.2"
|
|
154
154
|
},
|