Home  >  Q&A  >  body text

Solving Vue3 webcomponents production build issues

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粉323374878P粉323374878108 days ago331

reply all(1)I'll reply

  • P粉312195700

    P粉3121957002024-04-07 11:37:02

    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.`)
      }
    

    reply
    0
  • Cancelreply