WilliamDASILVA / nuxt-google-maps-module

Inject Google Maps script
MIT License
22 stars 8 forks source link

How to configure google key if key is sourced from vuex $store? #4

Open curtisbelt opened 6 years ago

curtisbelt commented 6 years ago

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.

coremyslo commented 6 years ago

Consider using .env file for api keys https://github.com/nuxt-community/dotenv-module