nitro-nightly 3.0.1-20251106-143644-01cf2a01 → 3.0.1-20251106-150516-127b5198
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/_presets.mjs +10 -4
- package/package.json +1 -1
package/dist/_presets.mjs
CHANGED
|
@@ -1540,13 +1540,19 @@ const vercel = defineNitroPreset({
|
|
|
1540
1540
|
publicDir: "{{ output.dir }}/static/{{ baseURL }}"
|
|
1541
1541
|
},
|
|
1542
1542
|
commands: {
|
|
1543
|
-
|
|
1544
|
-
|
|
1543
|
+
preview: "",
|
|
1544
|
+
deploy: "npx vercel deploy --prebuilt"
|
|
1545
1545
|
},
|
|
1546
1546
|
hooks: {
|
|
1547
1547
|
"build:before": async (nitro) => {
|
|
1548
|
-
|
|
1549
|
-
|
|
1548
|
+
const logger = nitro.logger.withTag("vercel");
|
|
1549
|
+
const runtime = await resolveVercelRuntime(nitro);
|
|
1550
|
+
if (runtime.startsWith("bun") && !nitro.options.exportConditions.includes("bun")) nitro.options.exportConditions.push("bun");
|
|
1551
|
+
logger.info(`Using \`${runtime}\` runtime.`);
|
|
1552
|
+
let serverFormat = nitro.options.vercel?.entryFormat;
|
|
1553
|
+
if (!serverFormat) serverFormat = nitro.routing.routes.routes.flatMap((r) => r.data).some((h$1) => h$1.format === "node") ? "node" : "web";
|
|
1554
|
+
logger.info(`Using \`${serverFormat}\` entry format.`);
|
|
1555
|
+
nitro.options.entry = nitro.options.entry.replace("{format}", serverFormat);
|
|
1550
1556
|
},
|
|
1551
1557
|
"rollup:before": (nitro) => {
|
|
1552
1558
|
deprecateSWR(nitro);
|
package/package.json
CHANGED