Next.js Discord

Discord Forum

Private Package with NextJS/React

Answered
Brown bear posted this in #help-forum
Open in Discord
Brown bearOP
Does anyone happen to have a current "recommended" way to handle private packages both in development and production?
Answered by @ts-ignore
well then you can publish a private package on npm and then login into your account to download the package and use it
View full answer

10 Replies

@@ts-ignore maybe a monorepo?
Brown bearOP
I currently do this, I have the following:

api
website
client-js - the node wrapper that consumes the API

I don't want to publish client-js publicly, but still import it as such @orgname/client-js
Answer
@@ts-ignore well then you can publish a private package on npm and then login into your account to download the package and use it
Brown bearOP
is there any "recommended" approach when using github's package manager?
github's package manager?
@@ts-ignore github's package manager?
Brown bearOP
github's package registry, I publish my private stuff to github's registry
@Brown bear github's package registry, I publish my private stuff to github's registry
I am sorry but I've never worked with github's package registry
but outside the monorepo then you can publish it privately yes