I've got a dotnet vue project running at the moment, but I get the following JavaScript error as soon as I add a Primevue component (e.g. Button) using the Vue.component method: SCRIPT1003: Expected ':'
I have also tried using babel to try solve the issue, but to no avail.
I've written the 'import' code in 2 different manners:
Code: Select all
import Vue from 'vue';
Vue.component('Button', require('primevue/button'));
Code: Select all
import Vue from 'vue';
import Button from 'primevue/button';
Vue.component('Button', Button);
WITHOUT BABEL
Code: Select all
"SyntaxError: Expected ':'\n at ./node_modules/vue-loader/lib/index.js?!./node_modules/primevue/components/button/Button.vue?vue&type=script&lang=js& (http://localhost:49754/dist/main.js?v=78BHWRkml25cYNi4l5kF3TU3R0AfWG3wRw-tGOAhbgM:4583:1)\n at __webpack_require__ (http://localhost:49754/dist/main.js?v=78BHWRkml25cYNi4l5kF3TU3R0AfWG3wRw-tGOAhbgM:20:12)\n at eval code (eval code:2:22)\n at ./node_modules/primevue/components/button/Button.vue?vue&type=script&lang=js& (http://localhost:49754/dist/main.js?v=78BHWRkml25cYNi4l5kF3TU3R0AfWG3wRw-tGOAhbgM:4524:1)\n at __webpack_require__ (http://localhost:49754/dist/main.js?v=78BHWRkml25cYNi4l5kF3TU3R0AfWG3wRw-tGOAhbgM:20:12)\n at eval code (eval code:3:22)\n at ./node_modules/primevue/components/button/Button.vue (http://localhost:49754/dist/main.js?v=78BHWRkml25cYNi4l5kF3TU3R0AfWG3wRw-tGOAhbgM:4512:1)\n at __webpack_require__ (http://localhost:49754/dist/main.js?v=78BHWRkml25cYNi4l5kF3TU3R0AfWG3wRw-tGOAhbgM:20:12)\n at eval code (eval code:2:1)\n at ./node_modules/primevue/button.js (http://localhost:49754/dist/main.js?v=78BHWRkml25cYNi4l5kF3TU3R0AfWG3wRw-tGOAhbgM:4500:1)"
Code: Select all
"SyntaxError: Expected ':'\n at ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./node_modules/primevue/components/button/Button.vue?vue&type=script&lang=js& (http://localhost:49754/dist/main.js?v=k06griEtXUrIegoRA9jNzr-jJdKYGwmWxNGkHtd_zVk:372:1)\n at __webpack_require__ (http://localhost:49754/dist/main.js?v=k06griEtXUrIegoRA9jNzr-jJdKYGwmWxNGkHtd_zVk:20:12)\n at eval code (eval code:2:22)\n at ./node_modules/primevue/components/button/Button.vue?vue&type=script&lang=js& (http://localhost:49754/dist/main.js?v=k06griEtXUrIegoRA9jNzr-jJdKYGwmWxNGkHtd_zVk:4536:1)\n at __webpack_require__ (http://localhost:49754/dist/main.js?v=k06griEtXUrIegoRA9jNzr-jJdKYGwmWxNGkHtd_zVk:20:12)\n at eval code (eval code:3:22)\n at ./node_modules/primevue/components/button/Button.vue (http://localhost:49754/dist/main.js?v=k06griEtXUrIegoRA9jNzr-jJdKYGwmWxNGkHtd_zVk:4524:1)\n at __webpack_require__ (http://localhost:49754/dist/main.js?v=k06griEtXUrIegoRA9jNzr-jJdKYGwmWxNGkHtd_zVk:20:12)\n at eval code (eval code:3:1)\n at ./node_modules/primevue/button.js (http://localhost:49754/dist/main.js?v=k06griEtXUrIegoRA9jNzr-jJdKYGwmWxNGkHtd_zVk:4512:1)"
Am I missing an IE 11 polyfill or does PrimeVue not support IE 11 (which I doubt)
Thanks for your help in advance..