nitro-nightly 3.0.1-20251110-120029-c61042ad → 3.0.1-20251110-120318-409ecf3c
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 +8 -6
- package/package.json +1 -1
package/dist/_presets.mjs
CHANGED
|
@@ -578,12 +578,14 @@ async function writeWranglerConfig(nitro, cfTarget) {
|
|
|
578
578
|
}
|
|
579
579
|
wranglerConfig.compatibility_flags ??= [];
|
|
580
580
|
if (nitro.options.cloudflare?.nodeCompat && !wranglerConfig.compatibility_flags.includes("nodejs_compat")) wranglerConfig.compatibility_flags.push("nodejs_compat");
|
|
581
|
-
if (
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
type
|
|
585
|
-
|
|
586
|
-
|
|
581
|
+
if (cfTarget === "module") {
|
|
582
|
+
if (wranglerConfig.no_bundle === void 0) wranglerConfig.no_bundle = true;
|
|
583
|
+
wranglerConfig.rules ??= [];
|
|
584
|
+
if (!wranglerConfig.rules.some((rule) => rule.type === "ESModule")) wranglerConfig.rules.push({
|
|
585
|
+
type: "ESModule",
|
|
586
|
+
globs: ["**/*.mjs", "**/*.js"]
|
|
587
|
+
});
|
|
588
|
+
}
|
|
587
589
|
await writeFile$1(wranglerConfigPath, JSON.stringify(wranglerConfig, null, 2), true);
|
|
588
590
|
const configPath = join$1(nitro.options.rootDir, ".wrangler/deploy/config.json");
|
|
589
591
|
await writeFile$1(configPath, JSON.stringify({ configPath: relative(dirname(configPath), wranglerConfigPath) }), true);
|
package/package.json
CHANGED