Solving Vue3 webcomponents production build issues
P粉323374878
P粉323374878 2024-04-06 12:43:37
0
1
661

I'm trying to migrate my vue2 web components to vue3, although the problem arises when I create the build for production.

I'm using vue-cli with --target wc and it now shows an error saying that vue3 web component support is still under development.

Remove the --target option, my build file is very different, I am relying on a .min file and without this option it won't build.

What are my options? Does vite provide the same build output that vue-cli previously provided for vue2?

P粉323374878
P粉323374878

reply all(1)
P粉312195700

Now - May 2022 - vue-cli-service is not supported at all --target wc In fact in the source code it is completely disabled

if (vueMajor === 3) {
    abort(`Vue 3 support of the web component target is still under development.`)
  }
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template