-
Notifications
You must be signed in to change notification settings - Fork 0
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
[VO-1227] chore: Migrate to Rsbuild #55
base: master
Are you sure you want to change the base?
Conversation
552a4a3
to
a2d7795
Compare
a2d7795
to
98ac75f
Compare
BundleMonFiles added (17)
Files removed (9)
Files updated (2)
Total files change -470.53KB -14.2% Groups added (3)
Final result: ✅ View report in BundleMon website ➡️ |
@cballevre very nice work |
|
||
let middlewares = [thunkMiddleware, loggerMiddleware] | ||
|
||
// Enable Redux dev tools | ||
const composeEnhancers = | ||
(__DEVELOPMENT__ && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose | ||
(flag('debug') && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the flag plugin is initialized on client's login
event and because client.login()
is asynchronous, it seems like relying on flag('debug')
here would be subject to race condition, wouldn't it?
I suppose it would work here because on web apps, the client.login()
only access local resources, so it would be fast enough to ends before the composeEnhancers initialisation. But it seems a bit risky.
This a mistake on the message 🙁 |
98ac75f
to
ca82d75
Compare
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
ca82d75
to
588ab49
Compare
44e02d4
to
8f998c6
Compare
Related PRs: