zudoku 0.71.2 → 0.71.3
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/cli/cli.js
CHANGED
|
@@ -3794,7 +3794,7 @@ import {
|
|
|
3794
3794
|
// package.json
|
|
3795
3795
|
var package_default = {
|
|
3796
3796
|
name: "zudoku",
|
|
3797
|
-
version: "0.71.
|
|
3797
|
+
version: "0.71.2",
|
|
3798
3798
|
type: "module",
|
|
3799
3799
|
sideEffects: [
|
|
3800
3800
|
"**/*.css",
|
|
@@ -7590,6 +7590,7 @@ import colors7 from "picocolors";
|
|
|
7590
7590
|
import PiscinaImport from "piscina";
|
|
7591
7591
|
init_transform_config();
|
|
7592
7592
|
init_invariant();
|
|
7593
|
+
init_joinUrl();
|
|
7593
7594
|
|
|
7594
7595
|
// src/vite/reporter.ts
|
|
7595
7596
|
function writeLine(output) {
|
|
@@ -7745,6 +7746,11 @@ var prerender = async ({
|
|
|
7745
7746
|
const routes = getRoutes(config2);
|
|
7746
7747
|
const paths = routesToPaths(routes);
|
|
7747
7748
|
const rewrites = routesToRewrites(routes);
|
|
7749
|
+
if (config2.redirects) {
|
|
7750
|
+
for (const r of config2.redirects) {
|
|
7751
|
+
paths.push(joinUrl(r.from));
|
|
7752
|
+
}
|
|
7753
|
+
}
|
|
7748
7754
|
const maxThreads = buildConfig?.prerender?.workers ?? Math.floor(os.cpus().length * 0.8);
|
|
7749
7755
|
const start = performance.now();
|
|
7750
7756
|
const LOG_INTERVAL_MS = 3e4;
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@ import { getBuildConfig } from "../../config/validators/BuildSchema.js";
|
|
|
12
12
|
import type { ZudokuConfig } from "../../config/validators/validate.js";
|
|
13
13
|
import { runPluginTransformConfig } from "../../lib/core/transform-config.js";
|
|
14
14
|
import invariant from "../../lib/util/invariant.js";
|
|
15
|
+
import { joinUrl } from "../../lib/util/joinUrl.js";
|
|
15
16
|
import type { MarkdownFileInfo } from "../plugin-markdown-export.js";
|
|
16
17
|
import { isTTY, throttle, writeLine } from "../reporter.js";
|
|
17
18
|
import { generateSitemap } from "../sitemap.js";
|
|
@@ -76,6 +77,13 @@ export const prerender = async ({
|
|
|
76
77
|
const routes = getRoutes(config);
|
|
77
78
|
const paths = routesToPaths(routes);
|
|
78
79
|
const rewrites = routesToRewrites(routes);
|
|
80
|
+
|
|
81
|
+
// Add redirect source paths so they get prerendered as redirects
|
|
82
|
+
if (config.redirects) {
|
|
83
|
+
for (const r of config.redirects) {
|
|
84
|
+
paths.push(joinUrl(r.from));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
79
87
|
const maxThreads =
|
|
80
88
|
buildConfig?.prerender?.workers ?? Math.floor(os.cpus().length * 0.8);
|
|
81
89
|
|