You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nx does a lot more than we need it for, and there's a feeling that this is weighing down on maintenance and cognitive load for new devs.
Wireit provides a much lighter-weight option for defining cross-task dependency and output caching – the two things we use Nx for.
We will try incrementally swapping out Nx for wireit in the various corners of the repo, starting with the lowest impact areas (e.g. github pages) and working up the biggest (e.g. publishing source).
This way, if it works well, we'll end up removing Nx as we see the benefit. If it doesn't, we can revert the changes.
Using Nx to run repo-wide tasks, for now
Because Nx will try to run matching npm-scripts if it can't find a task in the Nx project.json, we can keep using Nx to run the new wireit tasks while Nx is still set up to handle repo-wide tasks and some project-specific tasks.
For example, once github-pages is using wireit, running make github-pages:build can still call pnpm nx run github-pages:build. Since there's no actual build task in the project.json, Nx itself will run pnpm build in the github-pages project dir (starting the wireit task).
This reduces the amount of change we need to make each time while making it easier to revert to full Nx if we need to.
If/when we decide to remove Nx, updating everything to run the npm-scripts directly will be the last step.
Tip
Use a W!RE!T comment to leave inline instructions along the way that will help with any final switch over, e.g.
// W!RE!T// 1. remove the next line constsomeNxConfig={}// 2. uncomment this line// const someWireitConfig = {}
The content you are editing has changed. Please copy your edits and refresh the page.
Nx does a lot more than we need it for, and there's a feeling that this is weighing down on maintenance and cognitive load for new devs.
Wireit provides a much lighter-weight option for defining cross-task dependency and output caching – the two things we use Nx for.
We will try incrementally swapping out Nx for wireit in the various corners of the repo, starting with the lowest impact areas (e.g. github pages) and working up the biggest (e.g. publishing source).
This way, if it works well, we'll end up removing Nx as we see the benefit. If it doesn't, we can revert the changes.
Using Nx to run repo-wide tasks, for now
Because Nx will try to run matching
npm-scripts
if it can't find a task in the Nxproject.json
, we can keep using Nx to run the new wireit tasks while Nx is still set up to handle repo-wide tasks and some project-specific tasks.For example, once
github-pages
is using wireit, runningmake github-pages:build
can still callpnpm nx run github-pages:build
. Since there's no actualbuild
task in the project.json, Nx itself will runpnpm build
in thegithub-pages
project dir (starting the wireit task).This reduces the amount of change we need to make each time while making it easier to revert to full Nx if we need to.
If/when we decide to remove Nx, updating everything to run the npm-scripts directly will be the last step.
Tip
Use a
W!RE!T
comment to leave inline instructions along the way that will help with any final switch over, e.g.Tasks
wireit
on the storybook workflows #1273github-pages
tasks #1317project.json
topackage.json
#1334The text was updated successfully, but these errors were encountered: