I've done it in my apps entry JS file
You could do it in your Vue files just like you have regular JavaScript inside that file too
Basicly yes in .Vue file, inside script tag. But I usually separate file js and vue in my project, this is related with Sonar Coverage that not valid when read .Vue file. So In my .vue file just like <script src="./jsfile.js></script> So every js logic like importing depedency will exist in .js file.
Just import in component that needed its depedency. But for depedency that not available in npm maybe you need to add manual in index.html or copy depedency to your project and just import from your project path.
Обсуждают сегодня