Nuxt/test/fixtures/runtime-config/nuxt.config.js

18 lines
312 B
JavaScript
Raw Normal View History

export default {
publicRuntimeConfig: {
baseURL: process.env.BASE_URL
},
privateRuntimeConfig: {
baseURL: '${PUBLIC_URL}${BASE_URL}',
API_SECRET: ''
},
serverMiddleware: [
(req, _, next) => {
if (req.url.includes('?spa')) {
req.spa = true
}
next()
}
]
}