T
I ended up doing this in my plugin file. This makes it globally available.
// import something here
import _ from 'lodash';
// leave the export, even if you don't use it
export default ({ app, router, Vue }) => {
window._ = _;
};
And then add
globals: {
'ga': true, // Google Analytics
'cordova': true,
'$axios': true,
'_': true,
'__statics': true
},
into .eslintrc.js. So the linter doesn’t complain. One has to restart quasar dev to reload the .eslintrc.js file.
After that one can use lodash as usual just by typing _.