How to install Module-Federation in Nextjs
![Fiona Paul](https://cdn.sanity.io/images/pjqiaql6/production/13760d3ab01ec9bd3674d65c78a7533a6624db24-6016x4016.jpg)
Fiona Paul
![Cover Image for How to install Module-Federation in Nextjs](https://cdn.sanity.io/images/pjqiaql6/production/c1a358401f9c8c2018f43da6d5509dc5bc43ea8a-1600x732.png?w=1240)
![Fiona Paul](https://cdn.sanity.io/images/pjqiaql6/production/13760d3ab01ec9bd3674d65c78a7533a6624db24-6016x4016.jpg)
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.