I have written in script tag of Vue.js component as follows:
require("./js/swiper.min.js");
require("./js/wow.min.js");
export default {
mounted(){
var swiper = new Swiper('.swiper-container',{pagination: '.swiper-
pagination', paginationClickable: true,});
new WOW().init();
}
}
which results me the following error
[Vue warn]: Error in mounted hook: "TypeError: Cannot assign to read only
property 'exports' of object '#<Object>'"
It is working proper in index.html (a simple HTML file), but in Vue.js component it gives error.
Is it right way to use local javascript file in Vue.js?