How to use JQuery inside Vue | add other js library inside Vue

JQuery has awesome features. and a lot of plugins . sometimes someone wants to add jquery plugin but confused how connect jquery inside vue.

  • Major thinking points is JQuery package add globally or indivisually !

# Indivually setup

If jquery use only one page that time indivually setup is good practise .

import JQuery from 'jquery'
let $ = JQuery

# Globally setup

window.$ = require('jquery')
window.JQuery = require('jquery')

# other js packages

window._ = require('underscore') = require('select.js')

code4mk @code4mk



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store