Vue-cli: multi web component build

Created on 12 Jul 2018  路  3Comments  路  Source: vuejs/vue-cli

Version

3.0.0-beta.15

Reproduction link

https://github.com/GIP-RECIA/uPortal-web-components/tree/esco-content-menu/esco-content-menu

Steps to reproduce

Deploy it into html and you will get an error with babel :
only one instance of babel-polyfill is allowed

What is expected?

the rendering of the component

What is actually happening?

at console :

index.js:10 Uncaught Error: only one instance of babel-polyfill is allowed
at Object. (index.js:10)
at Object.201c (esco-content-menu.js?v=1531417175315:8145)
at __webpack_require__ (bootstrap:19)
at Module.WnQP (ActionFavorites.vue?40cb:2)
at __webpack_require__ (bootstrap:19)
at bootstrap:83
at bootstrap:83

and without rendering

bug needs team repro cli-service build

Most helpful comment

  • with RC5, I no longer see the Babel polyfill error.
  • With vue-style-loader 4.1.1 it should also fix the shadowDOM style injection error.

Then your project is left with an undefined regeneratorRuntime, which seems to be an issue of your @uportal/open-id-connect project and is not directly related to Vue CLI.

All 3 comments

  • with RC5, I no longer see the Babel polyfill error.
  • With vue-style-loader 4.1.1 it should also fix the shadowDOM style injection error.

Then your project is left with an undefined regeneratorRuntime, which seems to be an issue of your @uportal/open-id-connect project and is not directly related to Vue CLI.

Thanks @yyx990803!

Thanks a lot @yyx990803 !

Was this page helpful?
0 / 5 - 0 ratings