Open sforner405 opened 3 years ago
I would also like support for this. We're working on deploying web components for framework agnostic consumption and using vue to generate them. We already use Nx for other things, would be nice to use it for this too.
If any of y'all are interested in contributing toward this feature, the relevant code for this feature can be found here. Like @sforner405 said we currently lock the target to lib, but we could surface this as a configuration option so as to include wc
.
Can try to support, but will take some time. Maybe adding storybook support too.
In the meantime, has anyone found a workaround?
@JohannesHoppe: Right now we use https://github.com/karol-f/vue-custom-element
But then you are using directly the Vue CLI, right?
No just standard vue lib from the plugin
@sforner405 would be nice if you could share an example of your workaround.
Description
Support Vue CLI's web component generation, so the built artifacts can be integrated as web components.
Motivation
Many apps want to share components as web components and do want to integrate them, as they are framework agnostic. To be able to do that easily a type web component would be great.
Suggested Implementation
The Vue Cli already provides a target for it. It seems that all is similar to the library builder, but the target should be wc instead of lib. One way could be to implement a whole new type webcomponent, another to enhance the lib type so a option can be provided for setting the target.