Nx 10 Plans
See original GitHub issueNx 10 Plans
Nx 8 => Nx 9
Nx 8 to Nx 9 was a great release. These are some of the highlights.
Generic Tool
We always wanted Nx to be the tool that helps teams using different stack work together, share code, etc… That’s why a big focus of Nx 9 was to make it a great tool for many ecosystems.
Two Modes
Nx now works in two modes: standalone or as an extension to the Angular CLI. Nx will automatically select the right mode based on the preset you provided.
- `nx create-nx-workspace --preset=react` will use the standalone mode
- `nx create-nx-workspace --preset=angular` will use Angular CLI
- `nx create-nx-workspace --preset=angular --cli=nx` will use the standalone more with an Angular project
React Support
We put a lot of work into making the React story robust. We added support for publishable React libries, support for Next.JS etc… You can read more about it at https://blog.nrwl.io/react/home.
We also published a free book on building monorepos with React and launched a React version of nx.dev.
Supporting Design Systems
Nx has always been a great tool for design systems. You can develop components, test them, document them, use them in a variety of projects. When you change a component, you can run a test against that component and then test all the applications using that component.
This remains our focus. Last month we released Storybook support, which works both for Angular and React projects.
Nx Course
- Nx Workspaces Course – a free Nx course on YouTube.
- Advanced Nx Course – an advanced Nx course.
Check out the free course even if you are already an Nx user.
Bazel Support
It took us a bit longer to get started, but we are making good progress here. We are working with the Bazel folks to add support to Nx. I hope to get the first beta out by XMas, but it’s probably be around Old New Year (it’s a thing. look it up 😃 ). The good thing about our new approach to Bazel is that you can add or remove it with ease. This means that you can start without Bazel and only add it when you feel like it’s justified.
Nx 10
This is our plan for the next 6 months.
Stability
Nx 7 -> Nx 9 came with a lot of new capabilities. It’s time to solidify what we have and tie up loose ends. We are in the process of cleaning up the internals of Nx to make the model more sound.
Smarter Affected
A large monorepo can have projects written in different frameworks. For instance, you can have one app written in React and another one written in Angular. Currently, if you change the version of say Angular, Nx will retest and rebuild both the apps (and their corresponding libs).
Nx 10 will be able to understand what projects are affected by your changing package.json
. Most of it will be done automatically, by using advanced code analysis, but we will give you a way to manually configure it as well.
Computation Caching
If someone on your team already ran a similar command, Nx will be able to use their results to drastically speed up the command for everyone else. Support for computation caching is already available for Nx 8.12 and Nx 9 users, but it’s not “on” by default.
Distributed CI
In Nx 9 we introduced print-affected
and run-many
to make more complex CI setups straightforward. See the Azure DevOps example here. More examples are coming in in the next 6 months.
Bazel Support
A lot of it depends on the progress the Bazel team makes, but we will do our best to add Bazel support.
Mixing Monorepo and Polyrepo Development
Nx provides great ergonomics for developing projects within the same monorepo. Publishing packages to artifactory from the monorepo, and then consuming them in the monorepo, although possible, can be a bit tricky. For smaller companies it may not matter as much, but it’s a big deal for larger enterprises. This is one of the things we are going to address first in 2020.
Ecosystem
We have added nx list
to help you discover what Nx plugins are available and how to install them. Currently, all of them are plugins maintained by the Nx core team. We see interesting plugins being developed the community. We will provide more documentation on how to do it, help folks get started, and integrate them into nx list
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:75
- Comments:19 (5 by maintainers)
This is an Nx 10 beta: https://www.npmjs.com/package/@nrwl/workspace/v/10.0.0-beta.0. It works with Angular 10. Our plan is to cut an RC this week, and hopefully a final version next week.
App Composition with Microservice
<div align="center">Add Microservice to NX
</div>Solution with Google Cloud Functions
Google Cloud Functions Generator Generate a Google Cloud Function within a Nx workspace with dev tools:
nx generate @joelcode/gcp-function:http functionName
nx serve functionName
nx test functionName
nx deploy functionName
I took Nx development strategy for front-end components & applied it to back-end microservices (Google Cloud Functions). With my plugin, I can create & deploy production-ready microservices in 5 minutes. I then combine my microservices to develop a business automation strategy, business analytics, or data streaming pipeline.
GitHub Repository