We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when i try to build web components by vue-cli, components that use @vue/composition-api not work nice
I have a demo component like this
<template> <div>{{ timeText }}</div> </template> <script lang="ts"> import VueCompositionAPI, { computed, defineComponent, } from "@vue/composition-api"; import Vue from "vue"; Vue.use(VueCompositionAPI); export default defineComponent({ props: { time: { type: [Number, String], default: 0, }, }, setup(props) { const timeText = computed(() => { return +props.time + +new Date() + ""; }); return { timeText, }; }, }); </script>
copy to add another one component, then build web components
"test": "vue-cli-service build --target wc-async --name test-count './src/test/count.vue'", "test2": "vue-cli-service build --target wc-async --name test-count2 './src/test/count.vue'",
import file
<script src="<%= BASE_URL %>test-count/test-count.js"></script> <script src="<%= BASE_URL %>test-count2/test-count2.js"></script>
use in vue
<template> <div> <test-count time="108000000"></test-count> <test-count2 time="108000000"></test-count2> </div> </template>
what i saw is
I don`t see any error。It really bothers me, help please
The text was updated successfully, but these errors were encountered:
It seems the web components entry file load latest work well
Sorry, something went wrong.
@karol-f Have you ever encountered this problem?
Unfortunately not. But anyway, while using e.g. Vue@3 you should have Web Components support out of the box - https://vuejs.org/guide/extras/web-components.html#building-custom-elements-with-vue
@karol-f Have you ever encountered this problem? Unfortunately not. But anyway, while using e.g. Vue@3 you should have Web Components support out of the box - https://vuejs.org/guide/extras/web-components.html#building-custom-elements-with-vue
but I have many components used composition-api and vue < 2.7
No branches or pull requests
when i try to build web components by vue-cli, components that use @vue/composition-api not work nice
I have a demo component like this
copy to add another one component, then build web components
import file
use in vue
what i saw is

I don`t see any error。It really bothers me, help please
The text was updated successfully, but these errors were encountered: