Skip to content

Commit

Permalink
fix: support upcoming nitro version
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Feb 7, 2025
1 parent 3a17f52 commit c672f33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ export default defineNuxtModule<ModuleOptions>({
}
runtimeConfig.hub = hub
runtimeConfig.public.hub = {}
// Make sure to tell Nitro to not generate the wrangler.toml file
// Make sure to tell Nitro to not generate the .wrangler/deploy/config.json file
nuxt.options.nitro.cloudflare ||= {}
nuxt.options.nitro.cloudflare.noWranglerDeployConfig = true
// For old versions of Nitro, disable generating the wrangler.toml file
delete nuxt.options.nitro.cloudflare?.wrangler?.compatibility_flags
if (nuxt.options.nitro.cloudflare?.wrangler && Object.keys(nuxt.options.nitro.cloudflare.wrangler).length) {
log.warn('The `nitro.cloudflare.wrangler` defined options are not supported by NuxtHub, ignoring...')
Expand Down

0 comments on commit c672f33

Please sign in to comment.