Nuxt/test/fixtures/bridge/nuxt.config.ts

25 lines
517 B
TypeScript

import { defineNuxtConfig } from '@nuxt/kit'
// @ts-ignore
global.__NUXT_PREPATHS__ = (global.__NUXT_PREPATHS__ || []).concat(__dirname)
export default defineNuxtConfig({
components: true,
buildModules: [
'@nuxt/bridge'
],
serverMiddleware: [
{
handle (req, _res, next) {
req.spa = req.url.includes('?spa')
next()
}
}
],
buildDir: process.env.NITRO_BUILD_DIR,
plugins: ['~/plugins/setup.js'],
nitro: {
output: { dir: process.env.NITRO_OUTPUT_DIR }
}
})