Nuxt/nuxt.config.ts
renovate[bot] dadf50dbcd
chore(deps): update all non-major dependencies (3.x) (#29524)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
2024-10-16 22:52:04 +01:00

22 lines
616 B
TypeScript

// For pnpm typecheck:docs to generate correct types
import { addPluginTemplate, addRouteMiddleware } from 'nuxt/kit'
export default defineNuxtConfig({
modules: [
function () {
if (!process.env.DOCS_TYPECHECK) { return }
addPluginTemplate({
filename: 'plugins/my-plugin.mjs',
getContents: () => 'export default defineNuxtPlugin({ name: \'my-plugin\' })',
})
addRouteMiddleware({
name: 'auth',
path: '#build/auth.js',
})
},
],
pages: process.env.DOCS_TYPECHECK === 'true',
typescript: { shim: process.env.DOCS_TYPECHECK === 'true' },
})