Nuxt/test/fixtures/runtime-config/nuxt.config.js
Pooya Parsa 6cbcd59d4e
feat(config): improved runtimeConfig (#7420)
* fix: ensure interpolate value is a string

* feat: allow native values from dotenv

* test: update test for regression on native value check
2020-05-27 12:38:39 +02:00

19 lines
333 B
JavaScript

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