Skip to content
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

fix: Disable fastRefresh in shared Rsbuild configuration #2698

Closed
wants to merge 1 commit into from

Conversation

Ldoppea
Copy link
Member

@Ldoppea Ldoppea commented Jan 13, 2025

In our projects, we found that using
rsbuild build --watch --mode development instead of just rsbuild build --watch would speed up the re-build process

But when doing so, the bundler enables the
fastRefresh mode from plugin-react

For now, this mode does not work and trying to run the cozy-apps would produce a blank screen with some $RefreshSig$ is not defined. This may be due to our configuration where the cozy-apps are served by the cozy-stack instead of the Rsbuild dev server

Until we find how to make it work, we want to disable this feature by default

It is still possible to enable it by setting the enableFastRefresh parameter to true when calling getRsbuildConfig()

In our projects, we found that using
`rsbuild build --watch --mode development` instead of just
`rsbuild build --watch` would speed up the re-build process

But when doing so, the bundler enables the
[fastRefresh](https://rsbuild.dev/plugins/list/plugin-react#fastrefresh)
mode from plugin-react

For now, this mode does not work and trying to run the cozy-apps would
produce a blank screen with some `$RefreshSig$ is not defined`. This
may be due to our configuration where the cozy-apps are served by the
cozy-stack instead of the Rsbuild dev server

Until we find how to make it work, we want to disable this feature by
default

It is still possible to enable it by setting the `enableFastRefresh`
parameter to `true` when calling `getRsbuildConfig()`
@Ldoppea Ldoppea force-pushed the fix/rsbuild-config-dev branch from 8a6a839 to 3db3578 Compare January 13, 2025 17:23
@Ldoppea
Copy link
Member Author

Ldoppea commented Jan 14, 2025

Closing this in favor of #2700

@Ldoppea Ldoppea closed this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants