I am currently migrating a HTML template to Vue.
Now I started to import the Javascript files in the main.js file stored inside src.
My file looks like the following:
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import pageLoader from "./assets/js/global/page-loader";
import tooltips from "./assets/js/global/tooltips";
Vue.use(pageLoader);
Vue.use(tooltips);
Vue.config.productionTip = false;
new Vue({
router,
render: (h) => h(App),
}).$mount("#app");
Every Javascript file is located inside the src/js folder
But once I run the application I receive the following error:
Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
at Module.eval (webpack-internal:///./src/assets/js/utils/plugins.js:56)
at eval (webpack-internal:///./src/assets/js/utils/plugins.js:57)
at Module../src/assets/js/utils/plugins.js (app.js:1579)
at __webpack_require__ (app.js:849)
at fn (app.js:151)
at eval (webpack-internal:///./src/assets/js/global/tooltips.js:1)
at Object../src/assets/js/global/tooltips.js (app.js:1556)
at __webpack_require__ (app.js:849)
at fn (app.js:151)
at eval (webpack-internal:///./src/main.js:15)
The whole Projects can be seen on github on the following link: Link to github
What is causing this error? I would appreciate any kind of help to fix my issue.