Skip to content

wilson-urdaneta/next-plugins-example

 
 

Repository files navigation

Next.js Plugins Example

Node.js CI

Read more about this project @ www.grouparoo.com/blog/nextjs-plugins

An example of how to use a dynamic import to load a page from a random plugin outside of the main next "pages" directory. We have a monorepo, which we will be using Lerna to manage. We have a server project which is our main application and plugins which contain plugins the server can use. The plugin, my-nextjs-plugin contains a page, /pages/hello.tsx, which we want the main application to display.

  • server is the root project
  • plugins contains the plugins with additional pages and components we want to display in the main application

To Start:

npm install
npm run dev

About

How to load dynamic sub-components from an NPM package with next.js

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 64.4%
  • TypeScript 35.6%