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

26 lines
552 B
TypeScript
Raw Normal View History

import { defineNuxtConfig } from '@nuxt/bridge'
// @ts-ignore
global.__NUXT_PREPATHS__ = (global.__NUXT_PREPATHS__ || []).concat(__dirname)
export default defineNuxtConfig({
components: true,
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 }
2021-10-11 17:48:03 +00:00
},
bridge: {
meta: true,
vite: !process.env.TEST_WITH_WEBPACK
}
})