Search code examples
importcomponentsbitbucketstenciljsstencil-component

Using Stenciljs Components from my other repo in my current project


I have two private bitbucket repos with Stenciljs components and I want to use some components from one in the other. I do not want to upload them to npm or anything of the sort. Both repos are 100% Stenciljs.

I was wondering if there is a way I can import the components I need straight from the repo. I have read and write access to both repos.

Thank you for your help


Solution

  • To install a package that's not on NPM you can add a Git URL, e.g. for Bitbucket:

    npm install git+ssh://[email protected]/{user}/{repo}.git
    

    Then you can import the entire package in the second project and let Stencil handle bundling only the used components.