-
Notifications
You must be signed in to change notification settings - Fork 13
[VO-1228] chore: Migrate to Rsbuild #727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Nov 29, 2024
Closed
cdc84ec
to
369f285
Compare
BundleMonFiles added (7)
Files removed (16)
Total files change -168.35KB -11.62% Groups added (1)
Groups removed (1)
Groups updated (2)
Final result: ✅ View report in BundleMon website ➡️ |
5 tasks
ed29e35
to
e68747b
Compare
zatteo
approved these changes
Jan 15, 2025
e68747b
to
35d8d76
Compare
Non-regression tests have been done:
Performances comparison on my computer:
|
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 ``` 4,66s (initial build) 4,84s 4,12s 4,63s 5,08s ``` yarn watch --mode development ``` 3,09s (initial build) 0,66s 0,34s 0,18s 0,45s ``` Related code: https://github.com/cozy/create-cozy-app/blob/master/packages/cozy-scripts/scripts/watch.js#L13
`rsbuild-config-cozy-app` has been upgraded to `0.2.0` in order to retrieve the configuration needed to run `rsbuild dev` with our cozy-stack based architecture and then benefits from HMR feature Related PR: cozy/cozy-libs#2700
Since previous commit we can run `rsbuild dev` to enable HMR feature We now have 3 different scripts: - `yarn build`: build the app for production - `yarn watch`: like for the `build` script but with some optimizations in order to build faster and to trigger rebuild automatically when the code changes - `yarn dev`: build the app with HMR enabled. This should be the fastest way to debug the app, but the HMR feature may prevent the app to work in some environments (i.e. flagship app)
`rsbuild-config-cozy-app` has been upgraded to `0.2.1` in order to retrieve the configuration needed to run intents and public targets in the `rsbuild dev` mode Related PR: cozy/cozy-libs#2717
`rsbuild-config-cozy-app` has been upgraded to `0.3.0` in order to retrieve the configuration needed to import images and static assets Related PR: [cozy/cozy-libs#2728](cozy/cozy-libs#2728)
a30e3e2
to
1bcfbdd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work remaining to be done:
cs test
tojest
to makeyarn test
.bundlemonrc
to the new build structure