I want to use javascript npm module in django
template.
In javascript document, it says
npm install waveform-playlist --save
on cli
and to use this line in code.
import WaveformPlaylist from "waveform-playlist";
So, for now I write this script in template.html
<script>
import WaveformPlaylist from "waveform-playlist";
</script>
this error comes.
Cannot use import statement outside a module (at tracks:96:5)
I think some basic idea is wrong?
How can I use this type of javascript?