xkjyeah / vue-google-maps

Google maps component for vue with 2-way data binding
https://xkjyeah.github.io/vue-google-maps/
1.88k stars 474 forks source link

Erro on loading webpack-electron #435

Open mateusser opened 6 years ago

mateusser commented 6 years ago

Hello, I'm trying to use the maps inside an electron-vue project, but when I try to:

import * as VueGoogleMaps from 'vue2-google-maps'

The console shows this error: image

I found something related in this issue #322 using the fix

import * as VueGoogleMaps from 'vue2-google-maps/src/main'

But the error in this is case is the following:

image

Maybe is something with Webpack and vue-loader, but I'm trying to find it with no success. If there is a fix I would appreciate the sharing.

Thanks

henriquebremenkanp commented 6 years ago

I think you need to whitelist the package in your webpack.renderer.config.js

let whiteListedModules = ['vue', 'vue2-google-maps']
erickaby commented 6 years ago

Thanks @henriquebremenkanp, your solution worked for me.