Region plugin in Vue giving error while import #3540
Answered
by
katspaugh
laxmangaian
asked this question in
Q&A
-
Hi, I am trying to use wavesurfer.js in my application which built using Vue. When I import the Region plugin it's showing error like below. Importing as below:
Error:
|
Beta Was this translation helpful? Give feedback.
Answered by
katspaugh
Feb 6, 2024
Replies: 1 comment 3 replies
-
Try importing it as suggested in the readme: import Regions from 'wavesurfer.js/dist/plugins/regions.esm.js' |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like you're not using NPM, so you need to specify an actual path for the module, or a URL.
E.g. a CDN URL:
import WaveSurfer from 'http://unpkg.com/[email protected]/dist/wavesurfer.esm.js'
And similarly for the Regions plugin.