valaxy 0.28.9 → 0.28.10
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/node/cli/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'node:process';
|
|
2
2
|
import 'yargs';
|
|
3
3
|
import 'yargs/helpers';
|
|
4
|
-
export { c as cli, J as registerDevCommand, X as run, _ as startValaxyDev } from '../../shared/valaxy.
|
|
4
|
+
export { c as cli, J as registerDevCommand, X as run, _ as startValaxyDev } from '../../shared/valaxy.DbAZGdnY.mjs';
|
|
5
5
|
import 'node:os';
|
|
6
6
|
import 'node:path';
|
|
7
7
|
import 'consola';
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ALL_ROUTE, E as EXCERPT_SEPARATOR, G as GLOBAL_STATE, P as PATHNAME_PROTOCOL_RE, V as ViteValaxyPlugins, b as build, c as cli, a as createServer, d as createValaxyPlugin, e as customElements, f as defaultSiteConfig, g as defaultValaxyConfig, h as defaultViteConfig, i as defineAddon, j as defineConfig, k as defineSiteConfig, l as defineTheme, m as defineValaxyAddon, n as defineValaxyConfig, o as defineValaxyTheme, p as encryptContent, q as fixViteSsgHtml, r as generateClientRedirects, s as getGitTimestamp, t as getIndexHtml, u as getServerInfoText, v as isExternal, w as isInstalledGlobally, x as isKatexEnabled, y as isKatexPluginNeeded, z as isMathJaxEnabled, B as isPath, C as loadConfigFromFile, D as mergeValaxyConfig, F as mergeViteConfigs, H as postProcessForSSG, I as processValaxyOptions, J as registerDevCommand, K as resolveAddonsConfig, L as resolveImportPath, M as resolveImportUrl, N as resolveOptions, O as resolveSiteConfig, Q as resolveSiteConfigFromRoot, R as resolveThemeConfigFromRoot, S as resolveThemeValaxyConfig, T as resolveUserThemeConfig, U as resolveValaxyConfig, W as resolveValaxyConfigFromRoot, X as run, Y as ssgBuild, Z as ssgBuildLegacy, _ as startValaxyDev, $ as toAtFS, a0 as transformObject, a1 as version } from '../shared/valaxy.
|
|
1
|
+
export { A as ALL_ROUTE, E as EXCERPT_SEPARATOR, G as GLOBAL_STATE, P as PATHNAME_PROTOCOL_RE, V as ViteValaxyPlugins, b as build, c as cli, a as createServer, d as createValaxyPlugin, e as customElements, f as defaultSiteConfig, g as defaultValaxyConfig, h as defaultViteConfig, i as defineAddon, j as defineConfig, k as defineSiteConfig, l as defineTheme, m as defineValaxyAddon, n as defineValaxyConfig, o as defineValaxyTheme, p as encryptContent, q as fixViteSsgHtml, r as generateClientRedirects, s as getGitTimestamp, t as getIndexHtml, u as getServerInfoText, v as isExternal, w as isInstalledGlobally, x as isKatexEnabled, y as isKatexPluginNeeded, z as isMathJaxEnabled, B as isPath, C as loadConfigFromFile, D as mergeValaxyConfig, F as mergeViteConfigs, H as postProcessForSSG, I as processValaxyOptions, J as registerDevCommand, K as resolveAddonsConfig, L as resolveImportPath, M as resolveImportUrl, N as resolveOptions, O as resolveSiteConfig, Q as resolveSiteConfigFromRoot, R as resolveThemeConfigFromRoot, S as resolveThemeValaxyConfig, T as resolveUserThemeConfig, U as resolveValaxyConfig, W as resolveValaxyConfigFromRoot, X as run, Y as ssgBuild, Z as ssgBuildLegacy, _ as startValaxyDev, $ as toAtFS, a0 as transformObject, a1 as version } from '../shared/valaxy.DbAZGdnY.mjs';
|
|
2
2
|
import 'node:path';
|
|
3
3
|
import 'consola';
|
|
4
4
|
import 'fs-extra';
|
|
@@ -1751,7 +1751,7 @@ async function setupMarkdownPlugins(md, options, base = "/") {
|
|
|
1751
1751
|
return md;
|
|
1752
1752
|
}
|
|
1753
1753
|
|
|
1754
|
-
const version = "0.28.
|
|
1754
|
+
const version = "0.28.10";
|
|
1755
1755
|
|
|
1756
1756
|
const GLOBAL_STATE = {
|
|
1757
1757
|
valaxyApp: void 0,
|
|
@@ -2429,7 +2429,13 @@ function createConfigPlugin(options) {
|
|
|
2429
2429
|
define: mergedDefine,
|
|
2430
2430
|
resolve: {
|
|
2431
2431
|
alias: await getAlias(options),
|
|
2432
|
-
|
|
2432
|
+
// Dedupe the shared singletons that valaxy owns (it calls `createApp`,
|
|
2433
|
+
// `createRouter`, `createPinia`, `createI18n`) but themes/addons also
|
|
2434
|
+
// import. A second physical copy — e.g. resolved from a theme/addon that
|
|
2435
|
+
// doesn't surface valaxy's copy under pnpm — would mean `useI18n()` /
|
|
2436
|
+
// stores read a different instance than the one valaxy registered,
|
|
2437
|
+
// breaking translations / state. Forcing a single instance avoids that.
|
|
2438
|
+
dedupe: ["vue", "vue-router", "vue-i18n", "pinia"]
|
|
2433
2439
|
},
|
|
2434
2440
|
optimizeDeps: {
|
|
2435
2441
|
// do not entry node file
|
|
@@ -2489,6 +2495,9 @@ async function getAlias(options) {
|
|
|
2489
2495
|
{ find: /^vue$/, replacement: await resolveImportPath("vue/dist/vue.esm-bundler.js", true) }
|
|
2490
2496
|
);
|
|
2491
2497
|
}
|
|
2498
|
+
const vueRouterPkg = await resolveImportPath("vue-router/package.json");
|
|
2499
|
+
if (vueRouterPkg)
|
|
2500
|
+
alias.push({ find: /^vue-router$/, replacement: dirname(vueRouterPkg) });
|
|
2492
2501
|
options.addons.forEach((addon) => {
|
|
2493
2502
|
alias.push({
|
|
2494
2503
|
find: `${addon.name}/client/`,
|
|
@@ -4939,6 +4948,9 @@ function routesToPaths(routes) {
|
|
|
4939
4948
|
function defaultIncludedRoutes(paths) {
|
|
4940
4949
|
return paths.filter((i) => !i.includes(":") && !i.includes("*"));
|
|
4941
4950
|
}
|
|
4951
|
+
function getSsgSsrConfig() {
|
|
4952
|
+
return { noExternal: true };
|
|
4953
|
+
}
|
|
4942
4954
|
async function ssgBuild(valaxyApp, viteConfig = {}, userSsgOptions = {}) {
|
|
4943
4955
|
const { options } = valaxyApp;
|
|
4944
4956
|
if (!process.env.__VALAXY_SSG_NO_RESPAWN__) {
|
|
@@ -4975,16 +4987,15 @@ async function ssgBuild(valaxyApp, viteConfig = {}, userSsgOptions = {}) {
|
|
|
4975
4987
|
}
|
|
4976
4988
|
}
|
|
4977
4989
|
}
|
|
4978
|
-
const cdnModuleNames = (options.config.cdn?.modules || []).map((m) => m.name);
|
|
4979
4990
|
const configOutDir = viteConfig.build?.outDir || "dist";
|
|
4980
4991
|
const outDir = isAbsolute(configOutDir) ? configOutDir : resolve$1(options.userRoot, configOutDir);
|
|
4981
4992
|
const ssgTemp = resolve$1(outDir, ".vite-ssg-temp");
|
|
4982
4993
|
const defaultConfig = {
|
|
4983
4994
|
...defaultViteConfig,
|
|
4984
4995
|
plugins: await ViteValaxyPlugins(valaxyApp),
|
|
4985
|
-
ssr
|
|
4986
|
-
|
|
4987
|
-
|
|
4996
|
+
// `ssr.noExternal` only affects the server build (step 2) — the client build
|
|
4997
|
+
// ignores it. See `getSsgSsrConfig` for why everything is bundled.
|
|
4998
|
+
ssr: getSsgSsrConfig(),
|
|
4988
4999
|
build: {
|
|
4989
5000
|
sourcemap: false,
|
|
4990
5001
|
// Explicitly disable watch to prevent chokidar from opening too many
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valaxy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.28.
|
|
4
|
+
"version": "0.28.10",
|
|
5
5
|
"description": "📄 Vite & Vue powered static blog generator.",
|
|
6
6
|
"author": {
|
|
7
7
|
"email": "me@yunyoujun.cn",
|
|
@@ -141,8 +141,8 @@
|
|
|
141
141
|
"vitepress-plugin-group-icons": "^1.7.5",
|
|
142
142
|
"vue-i18n": "^11.4.2",
|
|
143
143
|
"yargs": "^18.0.0",
|
|
144
|
-
"@valaxyjs/
|
|
145
|
-
"@valaxyjs/
|
|
144
|
+
"@valaxyjs/devtools": "0.28.10",
|
|
145
|
+
"@valaxyjs/utils": "0.28.10"
|
|
146
146
|
},
|
|
147
147
|
"devDependencies": {
|
|
148
148
|
"@mdit-vue/plugin-component": "^3.0.2",
|