Closed aryaroudi closed 3 years ago
It is WebComponent on the outside, but inside it there is Vue component (I tried to explain it in docs/readme). It's not possible to easily convert all Vue specific behaviour to plain JS (I don't see any point in it).
I have a Vue project with different kinds of build and I want to export one of my components as Webcomponent.
so I made a
build.ts
file for test:and run the:
vue-cli-service build --target lib src/components/FullCalendar/build.ts
the result is this:![image](https://user-images.githubusercontent.com/43990136/102902643-9530e400-446f-11eb-93ec-8947a5b2d3b4.png)
now in
demo.html
if I add something like:I get an error:
Uncaught TypeError: Cannot read property 'use' of undefined
but if I include VUE
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
It will start working.So basically the webcomponent still will have a dependency to vue? I thought it is an individual webcomponent without any need to VUE. This can cause a problem in other frameworks and It hasn't been mentioned in
Documentation
for example I need to load VUe in a angular project in order to render thiscustom element
?