jhta / vue-trustpilot

Plugin to create Trustpilot widgets in an easy way.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot use import statement outside a module

JulianMelzig opened this issue · comments

I am getting this error when I use vue-trustpilot with nuxt. Any ideas ?

Bildschirmfoto 2020-06-16 um 20 21 56

@JulianMelzig, did you solve the problem?
@jhta

The plugin reported an error when I tried to use it. Has anyone encountered it?
image

Same here
{ src: '~/plugins/trustpilot.js' ,ssr:false }
or
{ src: '~/plugins/trustpilot.js' ,mode:'client'}

It seems to compile the code for the frontend

Same

However i got it working by transpiling vue-trustpilot.

Do this in config

transpile: [
      'vue-trustpilot', ...