Open
Description
Hi there 🙌,
First of all, thanks for the module! Awesome work.
About the issue
I've got a special case where I need to initialize the Intercom through an API using differents App ID's, so for example:
- domain.com/us should load the app id
XXX-1
- domain.com/jp should load the app id
XXX-2
- domain.com/uk should load the app id
XXX-3
So I've tried to boot manually from a custom plugin in nuxt like this:
export default({$intercom, store}) => {
const appId = store.state.country.intercomAppId
$intercom.boot({app_id: appId})
}
But it doesn't work because the module isn't being loaded if the nuxt.config.js
doesn't contain a valid app_id,
so there's no way to initialize the plugin manually.
Would you mind checking the following code?
Line 16 in d17894d
Could I help to send a PR or let me know if I'm doing something wrong?
Thanks!