Nuxt/nuxt.config.ts
renovate[bot] b7e10e3956
chore(deps): update all non-major dependencies (main) (#29523)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
2024-10-16 18:36:28 +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' },
})