- Nx has very good js/ts support, but is not limited to it
- the plugin architecture should mean we can bend it to our needs while getting the benefits of giving Nx something it understands
- It's been great in Source so far (guardian/source#1342)
- It enables us to wrap common tasks so that they always run:
- in the correct Node version and package manager
- with up-to-date dependencies
- without requiring user intervention
- It abstracts away the complexity of the tooling
- Prevent users from unwittingly running tasks in the wrong environment
- We tried three methods of building and bundling assets:
- Using the
@nrwl/workspace:run-commands
:- this didn't fit so well with the nx workflow of
project.json options
andconfig
- there would be added complexity from having a rollup config in each project and the difficulty of having dynamic imports in these
- this didn't fit so well with the nx workflow of
- Using the
@nrwl/web:rollup
plugin:- this required additional config to make it fit our needs
- we didn't needs large parts of the functionality
- Writing our own custom executor:
- this allows us to have full control over building and bundling of each package
- it fairly simple to build
- it is fully customisable so we can make changes in the future, e.g. use something other than Rollup if that became preferable
- We concluded that the custom executor was the preferred option for the reason above
- Using the