Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Use
development
mode when using watch
script
In cozy-script we used to enforce the development mode when doing a `yarn watch` The development mode changes the build behavior by removing some steps like minification which results to a faster build A side effect is that the code generated from the `watch` command is a bit different than the one generated from `build` command. This may produce some differences on the app's behavior, but this is rare enough (happened 1 or 2 times in the past years) so we consider the speed gain to still be valuable. Also we know that we should run a `build` locally as ultimate check before pushing new code to the git repo So we want to enable this mode in the new Rsbuild configuration Here are the timings for initial build and then 4 differents edits in the code that trigger a re-build yarn watch ``` 7,57s (initial build) 5,79s 5,83s 6,68s 7,15s ``` yarn watch --mode development ``` 7,00s (initial build) 0,69s 0,45s 0,92s 0,46s ``` Related code: https://github.com/cozy/create-cozy-app/blob/master/packages/cozy-scripts/scripts/watch.js#L13
- Loading branch information