The watch-admin mode is enabled by default
Page summary:In Strapi 5,
strapi developstarts in watch-admin mode by default, so the admin panel hot reloads without any additional flag. Use--no-watch-adminto disable it.
Watch-admin mode reloads the admin panel automatically while you edit its source files. In Strapi v4 you had to ask for this behavior explicitly, while in Strapi 5 you get it by default and opt out instead.
This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.
Breaking change description
In Strapi v4
Watch-admin mode is disabled by default. You start it with the --watch-admin flag:
strapi develop --watch-admin
A separate strapi watch-admin command is also available.
In Strapi 5
Watch-admin mode is enabled by default, so strapi develop alone hot reloads the admin panel. The --no-watch-admin flag disables it:
strapi develop --no-watch-admin
The standalone strapi watch-admin command is removed.
Migration
This section regroups useful notes and procedures about the introduced breaking change.
Notes
Passing --watch-admin in Strapi 5 is not an error, since the flag still exists and already defaults to true. Scripts that use it keep working, but the flag is redundant.
If watch-admin mode is disabled, you can also use --no-build-admin to prevent the admin panel from being built.
Manual migration
To migrate to Strapi 5:
- Search your
package.jsonscripts, Dockerfiles, and CI configuration files for--watch-adminandstrapi watch-admin. - Replace any
strapi watch-admincommand withstrapi develop. - Remove the now-redundant
--watch-adminflags, or keep them if you prefer being explicit. - Add
--no-watch-adminto the commands that must not hot reload the admin panel, such as scripts that previously relied on watch-admin mode being off by default.
See the CLI reference for the full list of options accepted by the strapi develop command.