nuxt-google-maps-module
nuxt-google-maps-module copied to clipboard
How to configure google key if key is sourced from vuex $store?
Hello, thanks for your work on this.
I'm creating a headless WordPress site, and for my use case the client needs to be able to add/modify their Google Map API key via a WordPress plugin - long story short, their google key comes into my Nuxt app via nuxtServerInit
, and is saved in $store.state.googleMapsKey
.
I am not sure how to bridge the gap between having the key loaded in $store.state.googleMapsKey
and nuxt.config.js. If this is outside your intended scope feel free to close! Thank you.
Consider using .env file for api keys https://github.com/nuxt-community/dotenv-module