Reputation: 85
I am trying to use the Wavesurfer.js plugins in my React Typescript application. When I try to import the plugins, I keep getting "module not found: can't resolve" error. I'm guessing this has something to do with defining the types for the plugins. Does anyone know how I could use these plugins in React Typescript?
import React from "react";
import WaveSurfer from "wavesurfer.js";
import CursorPlugin from "wavesurfer.cursor.js";
Upvotes: 2
Views: 1579
Reputation: 194
Try
import CursorPlugin from 'wavesurfer.js/dist/plugin/wavesurfer.cursor.min.js';
Upvotes: 4