hunter-isaiah96 / vue-wave-sufver

Vue Wrapper for wavesurfer.js
29 stars 11 forks source link

Nuxt issue #3

Closed circlebeats closed 4 years ago

circlebeats commented 4 years ago

Getting this error: 'Cannot use import statement outside a module''

Tried loading it in as through a component as well as globally with the same result.

circlebeats commented 4 years ago

i got it to work by setting the mode to client:

plugins: [ { src: '~/plugins/vue-wave-surfer', mode: 'client' } ],

Also the default wavesurfer options do not load automatically and therefore will not display the wave even if it is loading properly. For debugging i suggest setting a background color and media controls.

asyncData () { return { options:{ backgroundColor: '#FFF', mediaControls: true },