0👍
you can import that script in the component:
// Dashboard.vue
import * as dashboard from "./dashboard";
and then import jQuery inside dashboard.js
// dashboard.js
import jQuery from "jquery";
window.$ = window.jQuery = jQuery;
$(function() {
var $div = $("div");
$div.on("click", function() {
//do stuff
alert();
});
});
- [Vuejs]-How to force npm to instanciate only one copy of a dependecy from two different projects
- [Vuejs]-I want to limit the maximum display length 5 items for each list (VueJS)
Source:stackexchange.com