Nuxt/test/fixtures/runtime-config/nuxt.config.js
Pooya Parsa 0337932115
feat: runtime config and built-in dotenv support (#7312)
Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
Co-authored-by: Alexander Lichter <manniL@gmx.net>
2020-05-18 10:21:15 +02:00

18 lines
312 B
JavaScript

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()
}
]
}