How does vue.js introduce third-party native js plug-ins

problem description

how vue.js projects use native third-party libraries

the environmental background of the problems and what methods you have tried

I put the compressed files of the third-party library under the assets folder, introducing import"@ / assets/js/jtopo.min"

into the component.

related codes

/ / Please paste the code text below (do not replace the code with pictures)
import"@ / assets/js/jtopo.min"

what result do you expect? What is the error message actually seen?

ReferenceError: JTopo is not defined

Apr.11,2021

jtopo does not seem to be commonJs, and cannot directly require,. If you want to use it, there is a similar problem with
but under Vue, the framework of native js will have some problems more or less. It is recommended to use a similar framework compatible with Vue to replace


does not support import


do not forget the most basic usage. Can you use the script tag in html to introduce


but not the script tag directly?

Menu