Commit 89cf607 1 parent d9ecba2 commit 89cf607 Copy full SHA for 89cf607
File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -259,8 +259,15 @@ export default defineNuxtModule<ModuleOptions>({
259
259
}
260
260
261
261
if ( ! nuxt . options . dev ) {
262
- // Make sure we force the cloudflare-pages preset
263
- nuxt . options . nitro . preset = 'cloudflare-pages'
262
+ // Make sure to fallback to cloudflare-pages preset
263
+ let preset = nuxt . options . nitro . preset = nuxt . options . nitro . preset || 'cloudflare-pages'
264
+ // Support also cloudflare_module
265
+ preset = String ( preset ) . replace ( '_' , '-' )
266
+
267
+ if ( preset !== 'cloudflare-pages' && preset !== 'cloudflare-module' ) {
268
+ log . error ( 'NuxtHub is only compatible with the `cloudflare-pages` and `cloudflare-module` presets.' )
269
+ process . exit ( 1 )
270
+ }
264
271
}
265
272
266
273
if ( hub . remote ) {
You can’t perform that action at this time.
0 commit comments