nuxt-open-fetch
nuxt-open-fetch copied to clipboard
Dynamic base URL
Describe the feature
Using Nuxt 2, I'm configuring the base URL dynamically based on both process.client and process.env.NODE_ENV like so:
$axios.defaults.baseURL = process.client
? process.env.NODE_ENV === 'production'
? 'https://...'
: 'http://...'
: process.env.NODE_ENV === 'production'
? 'http://...'
: 'https://...'
I would like to be able to do this (presumably with import.meta.server instead of process.client) using NuxtOpenFetch and Nuxt 3.
Thanks for a great library!
Additional information
- [ ] Would you be willing to help implement this feature?
Final checks
- [X] Read the contribution guide.
- [X] Check existing discussions and issues.