Zoneless Migration
Angular has gone zoneless by default, so Cadmus is following. This is a long process, which is starting to get to its completion at the time of writing. Currently, all the new Cadmus projects are being created zoneless; the old ones have been prepared for the migration, but the last step (removing zoneless) is not yet done in the existing apps to leave more time for testing.
The preparation occurred in the previous months has been focused on migrating all the components to OnPush, replacing properties with signals so that the state of each component fully depends on signals and/or reactive forms. This is the core migration; it started from the smallest components (the bricks) and was progressively extended to cover all the components in all the Cadmus projects.
Going Zoneless
The last step will be progressively completed. It takes only a few minutes, and should be harmless given the previous preparation. It just consists in removing zone.js and configuring the app for zoneless, i.e.:
- in
app.configlocate the providers array and addprovideZonelessChangeDetection(), removingprovideZoneChangeDetection()if it was present. - in
angular.jsonfind your project’sarchitect->build->optionssection, look for thepolyfillsarray, and remove the line referencingzone.js. - ensure that there are no leftovers in
index.html: modern Angular CLI versions handle polyfills via theangular.jsonconfig above, but older projects might have a hardcoded script tag for Zone. If you see<script src="zone.js"></script>, remove it. - uninstall zone.js:
pnpm uninstall zone.js.