nuxt-google-maps-module icon indicating copy to clipboard operation
nuxt-google-maps-module copied to clipboard

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

Open curtisbelt opened this issue 6 years ago • 1 comments

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.

curtisbelt avatar Jun 07 '18 19:06 curtisbelt

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

coremyslo avatar Sep 04 '18 14:09 coremyslo