nitro-nightly 3.0.1-20251106-150349-6049d811 → 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.
Files changed (2) hide show
  1. package/dist/_presets.mjs +10 -4
  2. 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
- deploy: "",
1544
- preview: ""
1543
+ preview: "",
1544
+ deploy: "npx vercel deploy --prebuilt"
1545
1545
  },
1546
1546
  hooks: {
1547
1547
  "build:before": async (nitro) => {
1548
- if ((await resolveVercelRuntime(nitro)).startsWith("bun") && !nitro.options.exportConditions.includes("bun")) nitro.options.exportConditions.push("bun");
1549
- nitro.options.entry = nitro.options.entry.replace("{format}", nitro.options.vercel?.entryFormat === "node" ? "node" : "web");
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitro-nightly",
3
- "version": "3.0.1-20251106-150349-6049d811",
3
+ "version": "3.0.1-20251106-150516-127b5198",
4
4
  "description": "Build and Deploy Universal JavaScript Servers",
5
5
  "homepage": "https://nitro.build",
6
6
  "repository": "nitrojs/nitro",