I have VUE3 app with vue-router using third party web components imported as custom elements, I set the isCustomElement
option to ignore custom element, but it seems not to be taken into account.
- I set the
"vue": { "runtimeCompiler": true }
in package.json. - I set
app.config.isCustomElement = (tag) => tag.startsWith('bdl-')
to ignore customElements inmain.js
- I use web components - custom elements starting with
bdl-
inAbout.vue
:
<template>
<div class="about">
<h1>This is an about page</h1>
<bdl-fmi></bdl-fmi>
<bdl-range></bdl-range>
<bdl-chartjs-time></bdl-chartjs-time>
</div>
</template>
However, it seems that it's not taken into account and the browser console log contains warning [Vue warn]: Failed to resolve component: bdl-fmi
and custom elements fails to render in router view.
Tried VUE2 and the configuration Vue.config.ignoredElements = ['bdl-chartjs']
is working and similar application with vue-router do not try to interpret third party custom elements and renders as expected.
Any thoughts on isCustomElement
will be appreciated.
Sample with this issue can be seen at CODESANDBOX: https://codesandbox.io/s/vue-3-router-with-bodylightjs-components-h8v50