Open miljko1984 opened 6 years ago
I have the same problem, I'm using nuxt too: Unexpected token: punc (() [./node_modules/vue2-google-maps/src/components/polyg on.js:50,0]
I see that there is maybe a fix here: https://github.com/xkjyeah/vue-google-maps/pull/235
This solution worked for me: https://github.com/xkjyeah/vue-google-maps/issues/217#issuecomment-335912985
This solution worked for me: nuxt.config.js file
build: { extend (config, ctx) { config.module.rules.splice(0, 0, { test: /.js$/, include: [path.resolve(__dirname, './node_modules/vue2-google-maps')], loader: 'babel-loader', }) } }
And in top of file, before module.exports = { add - const path = require('path')
I had the same problem, I fixed it the same way mijiko did using the owner's solution https://github.com/xkjyeah/vue-google-maps/issues/206#issuecomment-338689932.
The solution works for me when running in dev, but the issue persists when attempting to build for production.
I have resolved my issue with the production build. I was using ./node_modules
when I should have been using ../node_modules
in my particular case as some of my directories and configuration is set up slightly different to standard.
I fixed with this solution too https://github.com/xkjyeah/vue-google-maps/issues/206#issuecomment-338689932
Hi, I'am using Nuxt.js with your plugin. All is working nice, but when i try to do npm run build i got this error:
Unexpected token: punc (() [./node_modules/vue2-google-maps/src/components/polygon.js:50,0][app.605102892b600e307771.js:467,8]
Thanks in advance.