- lib/guard.ts: pure checks (isNoindex with Nitro route-rule patterns, findOffenders over the app's ssr flag, every merged route rule, .client.vue pages and experimental.inlineRouteRules) - module options seo.noindexRoutes and seo.indexable; declared noindex routes get X-Robots-Tag: noindex, nofollow through their route rule - a production build fails with the D-70 message; nuxt dev and nuxt prepare only warn - testing/guard-check.mjs builds four fixture apps (guard:check)
16 lines
441 B
TypeScript
16 lines
441 B
TypeScript
// Build-guard fixture (testing/guard-check.mjs): an indexable route that
|
|
// renders only in the browser, once as a Nuxt route rule and once as a
|
|
// Nitro route rule. The build must fail with the D-70 message naming both.
|
|
export default defineNuxtConfig({
|
|
extends: ['../../..'],
|
|
compatibilityDate: '2025-07-15',
|
|
routeRules: {
|
|
'/x/**': { ssr: false },
|
|
},
|
|
nitro: {
|
|
routeRules: {
|
|
'/y/**': { ssr: false },
|
|
},
|
|
},
|
|
})
|