diff --git a/docs/nuxt.config.ts b/docs/nuxt.config.ts index 77a079c4..a4026bdd 100644 --- a/docs/nuxt.config.ts +++ b/docs/nuxt.config.ts @@ -1,6 +1,5 @@ // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ - compatibilityDate: '2024-08-06', // experimental: { buildCache: true }, extends: ['@nuxt/ui-pro'], modules: [ @@ -15,22 +14,12 @@ export default defineNuxtConfig({ '@nuxt/image', '@nuxt/scripts' ], + devtools: { + enabled: true + }, colorMode: { preference: 'dark' }, - icon: { - clientBundle: { - scan: true - } - }, - hooks: { - // Define `@nuxt/ui` components as global to use them in `.md` (feel free to add those you need) - 'components:extend': (components) => { - const globals = components.filter(c => ['UButton', 'UIcon'].includes(c.pascalName)) - - globals.forEach(c => c.global = true) - } - }, routeRules: { '/': { prerender: true }, '/api/search.json': { prerender: true }, @@ -46,6 +35,7 @@ export default defineNuxtConfig({ '/docs/server/cache': { redirect: { statusCode: 301, to: '/docs/features/cache' } }, '/docs/server/logs': { redirect: { statusCode: 301, to: '/docs/getting-started/server-logs' } } }, + compatibilityDate: '2024-08-06', nitro: { prerender: { crawlLinks: true, @@ -54,14 +44,24 @@ export default defineNuxtConfig({ autoSubfolderIndex: false } }, + typescript: { + strict: false + }, + hooks: { + // Define `@nuxt/ui` components as global to use them in `.md` (feel free to add those you need) + 'components:extend': (components) => { + const globals = components.filter(c => ['UButton', 'UIcon'].includes(c.pascalName)) + + globals.forEach(c => c.global = true) + } + }, cloudflareAnalytics: { token: '469b1f7049f14941acef0d0262a07ab3', scriptPath: false }, - devtools: { - enabled: true - }, - typescript: { - strict: false + icon: { + clientBundle: { + scan: true + } } }) diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index 6d30235e..724c4d2d 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -2,15 +2,28 @@ import module from '../src/module' export default defineNuxtConfig({ - future: { compatibilityVersion: 4 }, - devtools: { enabled: true }, - modules: [ '@nuxt/ui', '@nuxtjs/mdc', '@kgierke/nuxt-basic-auth', module ], + devtools: { enabled: true }, + + routeRules: { + '/cached': { prerender: true } + }, + future: { compatibilityVersion: 4 }, + + // nitro: { + // cloudflare: { + // wrangler: { + // compatibility_flags: ['nodejs_compat_v2'] + // } + // } + // }, + + compatibilityDate: '2024-08-08', hub: { ai: true, @@ -37,10 +50,6 @@ export default defineNuxtConfig({ // projectUrl: ({ branch }) => branch === 'main' ? 'https://playground.nuxt.dev' : `https://${encodeHost(branch).replace(/\//g, '-')}.playground-to39.pages.dev` }, - routeRules: { - '/cached': { prerender: true } - }, - basicAuth: { enabled: process.env.NODE_ENV === 'production', allowedRoutes: ['/api/_hub/'], @@ -50,15 +59,5 @@ export default defineNuxtConfig({ password: process.env.NUXT_ADMIN_PASSWORD || 'admin' } ] - }, - - // nitro: { - // cloudflare: { - // wrangler: { - // compatibility_flags: ['nodejs_compat_v2'] - // } - // } - // }, - - compatibilityDate: '2024-08-08' + } })