nitro-nightly 3.0.1-20251212-124050-0939a38d → 3.0.1-20251212-133814-37b3bbcb
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.
|
@@ -24,7 +24,7 @@ import { t as nitro } from "./vite.plugin.mjs";
|
|
|
24
24
|
//#region src/build/vite/build.ts
|
|
25
25
|
async function viteBuild(nitro$1) {
|
|
26
26
|
if (nitro$1.options.dev) throw new Error("Nitro dev CLI does not supports vite. Please use `vite dev` instead.");
|
|
27
|
-
const { createBuilder } = nitro$1.options.
|
|
27
|
+
const { createBuilder } = await import(nitro$1.options.__vitePkg__ || "vite");
|
|
28
28
|
await (await createBuilder({
|
|
29
29
|
base: nitro$1.options.rootDir,
|
|
30
30
|
plugins: [await nitro({ _nitro: nitro$1 })],
|
|
@@ -572,7 +572,6 @@ function nitroMain(ctx) {
|
|
|
572
572
|
appType: userConfig.appType || "custom",
|
|
573
573
|
resolve: { alias: ctx.rollupConfig.base.aliases },
|
|
574
574
|
builder: { sharedConfigBuild: true },
|
|
575
|
-
experimental: { enableNativePlugin: false },
|
|
576
575
|
server: {
|
|
577
576
|
port: Number.parseInt(process.env.PORT || "") || userConfig.server?.port || useNitro(ctx).options.devServer?.port || 3e3,
|
|
578
577
|
cors: false
|
|
@@ -668,15 +667,13 @@ function useNitro(ctx) {
|
|
|
668
667
|
async function setupNitroContext(ctx, configEnv, userConfig) {
|
|
669
668
|
const nitroConfig = {
|
|
670
669
|
dev: configEnv.command === "serve",
|
|
670
|
+
builder: "vite",
|
|
671
671
|
rootDir: userConfig.root,
|
|
672
672
|
...defu(ctx.pluginConfig, ctx.pluginConfig.config, userConfig.nitro)
|
|
673
673
|
};
|
|
674
674
|
nitroConfig.modules ??= [];
|
|
675
675
|
for (const plugin of flattenPlugins(userConfig.plugins || [])) if (plugin.nitro) nitroConfig.modules.push(plugin.nitro);
|
|
676
|
-
nitroConfig.builder = ctx._isRolldown ? "rolldown-vite" : "vite";
|
|
677
|
-
debug("[init] Using builder:", nitroConfig.builder);
|
|
678
676
|
ctx.nitro = ctx.pluginConfig._nitro || await createNitro(nitroConfig);
|
|
679
|
-
ctx.nitro.options.builder = ctx._isRolldown ? "rolldown-vite" : "vite";
|
|
680
677
|
if (!ctx.services?.ssr) if (userConfig.environments?.ssr === void 0) {
|
|
681
678
|
const ssrEntry = resolveModulePath("./entry-server", {
|
|
682
679
|
from: [
|
|
@@ -1371,7 +1371,7 @@ function stripLiteral(code, options) {
|
|
|
1371
1371
|
}
|
|
1372
1372
|
|
|
1373
1373
|
//#endregion
|
|
1374
|
-
//#region node_modules/.pnpm/@pi0+vite-plugin-fullstack@0.0.5-pr-1297_vite@
|
|
1374
|
+
//#region node_modules/.pnpm/@pi0+vite-plugin-fullstack@0.0.5-pr-1297_vite@8.0.0-beta.2_@types+node@25.0.1_esbuild@0_731610efec5feff0fd966b5d3f9a5558/node_modules/@pi0/vite-plugin-fullstack/dist/index.js
|
|
1375
1375
|
function parseIdQuery(id) {
|
|
1376
1376
|
if (!id.includes("?")) return {
|
|
1377
1377
|
filename: id,
|
package/dist/_nitro.mjs
CHANGED
|
@@ -518,16 +518,15 @@ async function resolveUnenv(options) {
|
|
|
518
518
|
//#endregion
|
|
519
519
|
//#region src/config/resolvers/builder.ts
|
|
520
520
|
const VALID_BUILDERS = [
|
|
521
|
-
"rollup",
|
|
522
521
|
"rolldown",
|
|
523
|
-
"
|
|
524
|
-
"
|
|
522
|
+
"rollup",
|
|
523
|
+
"vite"
|
|
525
524
|
];
|
|
526
525
|
async function resolveBuilder(options) {
|
|
527
526
|
options.builder ??= process.env.NITRO_BUILDER;
|
|
528
527
|
if (options.builder) {
|
|
529
528
|
if (!VALID_BUILDERS.includes(options.builder)) throw new Error(`Invalid nitro builder "${options.builder}". Valid builders are: ${VALID_BUILDERS.join(", ")}.`);
|
|
530
|
-
const pkg = options.builder
|
|
529
|
+
const pkg = options.builder;
|
|
531
530
|
if (!isPkgInstalled(pkg, options.rootDir)) {
|
|
532
531
|
if (!await consola$1.prompt(`Nitro builder package \`${pkg}\` is not installed. Would you like to install it?`, {
|
|
533
532
|
type: "confirm",
|
|
@@ -569,7 +568,7 @@ function isPkgInstalled(pkg, root) {
|
|
|
569
568
|
}
|
|
570
569
|
async function installPkg(pkg, root) {
|
|
571
570
|
const { addDevDependency } = await import("./cli/_chunks/dist4.mjs");
|
|
572
|
-
return addDevDependency(pkg
|
|
571
|
+
return addDevDependency(pkg, { cwd: root });
|
|
573
572
|
}
|
|
574
573
|
|
|
575
574
|
//#endregion
|
|
@@ -906,8 +905,7 @@ async function build(nitro) {
|
|
|
906
905
|
const { rolldownBuild } = await import("./_build/rolldown.mjs");
|
|
907
906
|
return rolldownBuild(nitro);
|
|
908
907
|
}
|
|
909
|
-
case "vite":
|
|
910
|
-
case "rolldown-vite": {
|
|
908
|
+
case "vite": {
|
|
911
909
|
const { viteBuild } = await import("./_build/vite.build.mjs");
|
|
912
910
|
return viteBuild(nitro);
|
|
913
911
|
}
|
package/dist/types/index.d.mts
CHANGED
|
@@ -3004,7 +3004,7 @@ interface NitroOptions extends PresetOptions {
|
|
|
3004
3004
|
*/
|
|
3005
3005
|
retryDelay: number;
|
|
3006
3006
|
};
|
|
3007
|
-
builder?: "rollup" | "rolldown" | "vite"
|
|
3007
|
+
builder?: "rollup" | "rolldown" | "vite";
|
|
3008
3008
|
rollupConfig?: RollupConfig;
|
|
3009
3009
|
entry: string;
|
|
3010
3010
|
unenv: Preset[];
|
package/dist/vite.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import "./_dev.mjs";
|
|
2
2
|
import "unenv";
|
|
3
3
|
import { Plugin } from "vite";
|
|
4
|
-
import "rollup";
|
|
5
4
|
import { Nitro, NitroConfig, NitroModule } from "nitro/types";
|
|
6
5
|
|
|
7
6
|
//#region src/build/vite/types.d.ts
|
|
@@ -16,11 +15,6 @@ declare module "vite" {
|
|
|
16
15
|
nitro?: NitroModule;
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
declare module "rollup" {
|
|
20
|
-
interface Plugin {
|
|
21
|
-
nitro?: NitroModule;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
18
|
interface NitroPluginConfig extends NitroConfig {
|
|
25
19
|
/**
|
|
26
20
|
* @internal Use preinitialized Nitro instance for the plugin.
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-nightly",
|
|
3
|
-
"version": "3.0.1-20251212-
|
|
3
|
+
"version": "3.0.1-20251212-133814-37b3bbcb",
|
|
4
4
|
"description": "Build and Deploy Universal JavaScript Servers",
|
|
5
5
|
"homepage": "https://nitro.build",
|
|
6
6
|
"repository": "nitrojs/nitro",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"type": "module",
|
|
9
|
+
"imports": {
|
|
10
|
+
"#nitro/runtime/*": "./dist/runtime/internal/*.mjs",
|
|
11
|
+
"#nitro/virtual/*": "./dist/runtime/virtual/*.mjs"
|
|
12
|
+
},
|
|
9
13
|
"exports": {
|
|
10
14
|
".": "./dist/runtime/nitro.mjs",
|
|
11
15
|
"./app": "./dist/runtime/app.mjs",
|
|
@@ -27,10 +31,6 @@
|
|
|
27
31
|
"./vite": "./dist/vite.mjs",
|
|
28
32
|
"./vite/runtime": "./dist/runtime/vite.mjs"
|
|
29
33
|
},
|
|
30
|
-
"imports": {
|
|
31
|
-
"#nitro/runtime/*": "./dist/runtime/internal/*.mjs",
|
|
32
|
-
"#nitro/virtual/*": "./dist/runtime/virtual/*.mjs"
|
|
33
|
-
},
|
|
34
34
|
"types": "./lib/index.d.mts",
|
|
35
35
|
"bin": {
|
|
36
36
|
"nitro": "./dist/cli/index.mjs"
|
|
@@ -142,7 +142,6 @@
|
|
|
142
142
|
"react": "^19.2.3",
|
|
143
143
|
"rendu": "^0.0.7",
|
|
144
144
|
"rolldown": "1.0.0-beta.54",
|
|
145
|
-
"rolldown-vite": "^7.2.11",
|
|
146
145
|
"rollup": "^4.53.3",
|
|
147
146
|
"rou3": "^0.7.11",
|
|
148
147
|
"scule": "^1.3.0",
|
|
@@ -160,6 +159,8 @@
|
|
|
160
159
|
"unimport": "^5.5.0",
|
|
161
160
|
"untyped": "^2.0.0",
|
|
162
161
|
"unwasm": "^0.5.2",
|
|
162
|
+
"vite": "npm:vite@^8.0.0-beta.2",
|
|
163
|
+
"vite7": "npm:vite@^7.2.7",
|
|
163
164
|
"vitest": "^4.0.15",
|
|
164
165
|
"wrangler": "^4.54.0",
|
|
165
166
|
"xml2js": "^0.6.2",
|
|
@@ -169,8 +170,8 @@
|
|
|
169
170
|
"peerDependencies": {
|
|
170
171
|
"nf3": ">=0.3.1",
|
|
171
172
|
"rolldown": "*",
|
|
172
|
-
"rollup": "^4
|
|
173
|
-
"vite": "
|
|
173
|
+
"rollup": "^4",
|
|
174
|
+
"vite": ">=7",
|
|
174
175
|
"xml2js": "^0.6.2"
|
|
175
176
|
},
|
|
176
177
|
"peerDependenciesMeta": {
|