I have a index.php with html and script sections. I have few canvas with charts on it and now I need to import plugin 'chartjs-plugin-annotation ' which looks like typical ES6 module. If I used React the solution would be simple, I would just add it to the project with npm. But I don't know how to do it on my site.
I was trying to do this somehow like this, but it didin't worked. Even tried to add type= "module" but it also didn't worked.
<script src="../Chart.bundle.min.js"></script>
where path was like: /chartjs-annotation-plugin/src/annotation.js etc. Link to plugin on github: chartjs-plugin-annotation. I'm not very experienced in javascript cause I'm backend dev so this could be also the problem.
Try to do: