build: configure Cloudflare Pages deployment

- Add wrangler CLI and workerd runtime as dev dependencies
- Configure nitro prerender with autoSubfolderIndex disabled for Pages
- Add Turnstile validation endpoint for server-side CAPTCHA verification
- Add baseline-browser-mapping for browser compatibility
This commit is contained in:
2026-02-04 22:40:50 +01:00
parent 70e4ce8b4b
commit 1162e4e85e
7 changed files with 752 additions and 50 deletions

View File

@@ -18,7 +18,6 @@ export default defineNuxtConfig({
'@nuxt/ui',
'@nuxt/content',
'@nuxtjs/i18n',
'@nuxtjs/turnstile',
'@nuxtjs/device',
'@nuxt/icon',
'@nuxt/fonts',
@@ -40,6 +39,8 @@ export default defineNuxtConfig({
// { code: 'lfn', name: 'Elefen', language: 'lfn', file: 'lfn.json' },
// { code: 'ei', name: 'Eittlandic', language: 'ei-ST', file: 'ei.json' },
],
langDir: 'locales',
lazy: false,
strategy: 'no_prefix',
defaultLocale: 'en',
},
@@ -69,15 +70,14 @@ export default defineNuxtConfig({
'autoprefixer': {}
}
},
turnstile: {
addValidateEndpoint: true
},
runtimeConfig: {
turnstile: {
secretKey: '', // Overriden by NUXT_TURNSTILE_SECRET_KEY
},
public: {
apiBase: process.env.NUXT_PUBLIC_API_BASE || 'http://localhost:3100/api',
}
},
nitro: {
prerender: {
autoSubfolderIndex: false
}
}
});