How can I use a vue package on other projects?

1596 views vue.js

I have written some base components for the organization I work in and now I'd like them to be used in other projects, the file structure is something like this:


I have a few requirements:

  1. I don't want to publish it to npm
  2. It does not have a dedicated git repo, it's part of a larger git repo with other projects (if necessary I can create a dedicated repo, but it's better not to)
  3. I'd like it to be used like other Vue libs, so all the user has to do is import it in main and use it.

answered question

1 Answer


If you are using vue cli, you can create a library by setting the build target.

Otherwise, rollup and webpack are commonly used for authoring libraries.

posted this

Have an answer?


Please login first before posting an answer.