Giter Club home page Giter Club logo

nextjs-nx-module-federation's Introduction

Nextjs, Nx and Module Federation

This is an example project to demonstrate how to use Nx, Next.js and Module Federation together.

โš  This example depends on @module-federation/nextjs-mf. It will not work unless you have access to this plugin, which is not free.

Articles

Also this project was created as a proof of concept to write one article, you can read it here:

Techs & Tools

This project came with some powerful tools

Core

Plugins

Linting & Tests

3rd party components

Remotes

Running in the development environment

To run the project you have to use Nx CLI

To start the project in development mode you can just run:

npx nx serve store

This will start the store application, also you can run all apps by using:

npx nx run-many --target=serve --all

Creating new apps

You can creating new applications on this workspace using some Nx Generators from this Nx + Next.js plugin like the command bellow:

npx nx g @nrwl/next:app app-name

Creating new pages

To generate new pages you can just use:

npx nx g @nrwl/next:page new-page --project=app-name

Creating new components

To generate new components you can just use:

npx nx g @nrwl/next:component new-component --project=app-name

Creating libraries

You can also use @nrwl/next plugin to generate libs, shared ui elements, design-system, etc... just running:

npx nx g @nrwl/next:lib new-lib-name

Sharing

Other information can be found in the article, I also strongly recommend you to take a look at the module-federation-examples, especially this example with nextjs

nextjs-nx-module-federation's People

Contributors

brunos3d avatar scriptedalchemy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.