Is there a way to generate a component with Vue 2 using Bit? Right now, seems like creating a component comes with Vue 3 as a peerDependency (which is fine since Vue 2 is going to be out of support by December) but I'm asking if there's a specific version to set or something to start developing components using Vue 2?
Bit compatible with Vue 2?
79 Views Asked by frustrateddeveloper At
2
There are 2 best solutions below
0

No, Bit.dev does not support Vue 2.0
Support for Vue is rather recent, and as such only available from Vue 3 and up. Please consult the documentation.
Assuming you already install Bit by a
npm install bit-bin --global
.First, navigate to your project directory and initialize Bit.
Create a component or generate using
vue-generate-component
.In your component's
package.json
file, specify dependency like;Track the component using bit add >
bit add src/components/your-component
.Once you've made changes to your component, you can tag it;
Finally, you can export your component to a remote scope by a
bit export user-name.scope-name
.*Replace
user-name
andscope-name
with your actual Bit username and scope name."Note that while Bit supports Vue 2, it's recommended to start using Vue 3 for new projects as Vue 2 is going to be out of support by December 2023."