1

I'm trying to install a custom library from gitLab.

The folder structure looks like the following:

my-lib: (git root)
+dist
--->actual npm lib
+src
+assets
+blabla

As you can see, the actual package is sitting inside dist folder, and the rest is my source code for building this library.

I did follow this post(Install npm module from gitlab private repository), and called
npm i git+ssh://git@{my-repo}:{group-name}/{project-name}.git#{branch}

This does work, but it's getting the source code as well. As a result, if I want to use this lib in my project, I have to import it like import ** from 'my-lib/dist'.

My question is how to tell npm, fetch from this dist folder rather than from the root.

Thanks

MaXon
  • 465
  • 2
  • 8
  • 17
  • for anyone looking for the answer, import ** from 'my-lib/dist' may produce a module not found error – MaXon Oct 05 '18 at 05:12

0 Answers0