nestjs-package-starter icon indicating copy to clipboard operation
nestjs-package-starter copied to clipboard

Export Lib Barrel File Rather Than Only Test Function

Open JimLynchCodes opened this issue 5 years ago • 1 comments

Hello!

Just wanted to say thanks for this great project!

It helped me out a lot in creating a shared backend library for my team(s) to use in all our various projects. 👍

One slight issue I had was that when I added a new service in my lib and exported it in the index.ts, my projects consuming the nom package could not find it.

Please correct me if this package.json is purposely pointing main to dist/test.js, but to me it seems like this just "accidentally works" in this situation because "test" just so happens to be the only thing exported by the lib. 😅

JimLynchCodes avatar Oct 12 '20 16:10 JimLynchCodes

Yeah, this should most likely be pointed at the barrel file as you've set. We'll see when we can get this updated 👍

jmcdo29 avatar Oct 12 '20 20:10 jmcdo29