nitro-nightly 3.0.1-20251109-204839-58c9ebfa → 3.0.1-20251109-233730-ab0fad99
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 +3 -12
- package/package.json +1 -1
package/dist/_presets.mjs
CHANGED
|
@@ -529,17 +529,9 @@ async function writeCFPagesRedirects(nitro) {
|
|
|
529
529
|
}
|
|
530
530
|
async function enableNodeCompat(nitro) {
|
|
531
531
|
nitro.options.cloudflare ??= {};
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
const userCompatibilityFlags = new Set(config?.compatibility_flags || []);
|
|
536
|
-
if (userCompatibilityFlags.has("nodejs_compat") || userCompatibilityFlags.has("nodejs_compat_v2") || nitro.options.cloudflare.deployConfig) nitro.options.cloudflare.nodeCompat = true;
|
|
537
|
-
}
|
|
538
|
-
if (!nitro.options.cloudflare.nodeCompat) {
|
|
539
|
-
if (nitro.options.cloudflare.nodeCompat === void 0) nitro.logger.warn("[cloudflare] Node.js compatibility is not enabled.");
|
|
540
|
-
return;
|
|
541
|
-
}
|
|
542
|
-
nitro.options.unenv.push(unencCfNodeCompat);
|
|
532
|
+
nitro.options.cloudflare.deployConfig ??= true;
|
|
533
|
+
nitro.options.cloudflare.nodeCompat ??= true;
|
|
534
|
+
if (nitro.options.cloudflare.nodeCompat) nitro.options.unenv.push(unencCfNodeCompat);
|
|
543
535
|
}
|
|
544
536
|
const extensionParsers = {
|
|
545
537
|
".json": h,
|
|
@@ -751,7 +743,6 @@ const cloudflareModule = defineNitroPreset({
|
|
|
751
743
|
hooks: {
|
|
752
744
|
"build:before": async (nitro) => {
|
|
753
745
|
await enableNodeCompat(nitro);
|
|
754
|
-
if (nitro.options.builder?.includes("rolldown")) nitro.options.minify = false;
|
|
755
746
|
},
|
|
756
747
|
async compiled(nitro) {
|
|
757
748
|
await writeWranglerConfig(nitro, "module");
|
package/package.json
CHANGED