How to install Module-Federation in Nextjs
Fiona Paul
Fiona Paul
Steps to install module-federation plugin in nextjs
-
Purchase a license to @module-federation/nextjs-mf library from privjs.com
-
Run the following commands in your terminal to configure the license on your machine:
$ npm config set @module-federation:registry https://r.privjs.com
$ npm config set //r.privjs.com/:_authToken xxxxx-xxxx-xxxx
Replace xxxxx-xxxx-xxxx
with the token provided to you by privjs.com. The token should be sent to you in your email. If you do'nt have a token then you can create a new token by logging into your PrivJs account (link)
- Install the package in you project using the following command:
$ npm i @module-federation/nextjs-mf
That's it! If you face any issues, write to us at support@privjs.com
and we would be happy to help you.