I would like to know how to use a jQuery library inside a vue file in Laravel 5.4
I want to use this library in my vue file: input mask
In my vue file I am creating a table and each row has a form with a date field with class 'date'.
With jQuery I will mask these fields with: $('.date').mask('00/00/0000');
How can I import the library to vue and mask all these date fields?
The js file is in: public/js/jquery.mask.min.js
I tried:
var mask_script = require('/js/jquery.mask.min.js');
and:
var mask_script = require('js/jquery.mask.min.js');
And then:
export default {
mounted: function () {
this.loadData();
$('.date').mask('00/00/0000');
But I get this error on npm run dev:
Can't resolve js/jquery.mask.min.js
Can someone please help?