- 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)
14 lines
373 B
TypeScript
14 lines
373 B
TypeScript
// Build-guard fixture (testing/guard-check.mjs): the same browser-only
|
|
// route, declared noindex. The build passes and the route is served with
|
|
// X-Robots-Tag: noindex, nofollow.
|
|
export default defineNuxtConfig({
|
|
extends: ['../../..'],
|
|
compatibilityDate: '2025-07-15',
|
|
routeRules: {
|
|
'/x/**': { ssr: false },
|
|
},
|
|
seo: {
|
|
noindexRoutes: ['/x/**'],
|
|
},
|
|
})
|