IE 11 - Webpack js issue

UI Components for Vue
Post Reply
HuNtR_RSA
Posts: 1
Joined: 15 Jul 2019, 10:47

16 Jul 2019, 16:01

Hi.

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'));
AND

Code: Select all

import Vue from 'vue';
 import Button from 'primevue/button';
 Vue.component('Button', Button);
 
The syntax error is as follows:

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)"
WITH BABEL

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..

cagatay.civici
Prime
Posts: 18098
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

28 Jul 2019, 15:59

Does it only happen with Button, can you try with another component? If it happens at build time, it should not be related to IE or polyfill.

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest