Monorepo
Posted on October 2, 2021
Tags: javascript
https://nx.dev/packages/next
npx create-nx-workspace@latest --preset=next
- apps <—- Holds your projects
- blehNextApp <— our nextjs app
- pages
- package.json <— note the nextjs is different from typical
- pages
- blehNextapp-e2e
- blehNextApp <— our nextjs app
- libs <—— Holds your shared components
- tools
- nx.json
- package.json
npx nx list
Since our nextjs default serves 127.0.0.1 but we need 0.0.0.0.
Check the https://nx.dev/packages/next/executors/server
to see what we can configure in app/blehNextApp/package.json
- useful because if you installed frameworks like
next
you also get alot of node_modules dependencies which you can import in your own project viaimport braces from 'braces';
- but also note most of these packages do not have types so your tsconfig cannot be full strict