Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fourcube/nextjs-babel-yarn-workspaces

Example for using a monorepo layout with NextJS, babel and yarn workspaces.
https://github.com/fourcube/nextjs-babel-yarn-workspaces

Last synced: 4 days ago
JSON representation

Example for using a monorepo layout with NextJS, babel and yarn workspaces.

Awesome Lists containing this project

README

        

# Next.js + Babel Monorepo

To run this:

`yarn`
`yarn --cwd web dev`

## Keypoints that make this work

`web/next.config.js` points to the root `babel.config.js`. For all sibling modules it forces `babel-loader` to use `rootMode: "upward"` so the modules discover the root `babel.config.js`. All babel configuration is hoisted into the root `babel.config.js` by providing `overrides` for each module.