nuxt-hub / core

Build full-stack applications with Nuxt on CloudFlare, with zero configuration.
https://hub.nuxt.com
Apache License 2.0
819 stars 37 forks source link

#ccdfb21 (force preset) is breaking change #93

Closed oritwoen closed 2 months ago

oritwoen commented 2 months ago

The change from the commit: #ccdfb21 completely prevented me from using the project.

I have a project that for some reasons must use cloudflare-module as a preset and I am in the process of migrating the functionality and infrastructure to cloudflare-pages one by one.

In v0.5.15 which enforces the cloudflare-pages preset, I cannot make any changes and deploy to cloudflare-module because this preset is overwritten with a different value.

I will note here that cloudflare-module works very well in dev and production. The entire @nuxthub/core works perfectly on both presets: cloudflare-pages and cloudflare-module.

I know because I have been using @nuxthub/core and the cloudflare-module preset in production for several days now and everything works.

At this moment I have pin version v0.5.14 in the project.

okydk commented 2 months ago

I agree. As dynamic sub-domains is not supported on Pages yet, we're also forced to build as cloudflare worker/module.

Atinux commented 2 months ago

First of all, I am sorry that this break your applications.

Second, I am very pleased to see that it also works for cloudflare-module!

Let me open a PR to fix that, you will need to specify the preset in your nuxt.config.ts:

export default defineNuxtConfig({
  nitro: {
    preset: 'cloudflare-module'
  }
})

Is it good for both of you @oritwoen @okydk ?

Atinux commented 2 months ago

You can now safely upgrade to v0.5.16