diff --git a/packages/rspack-dev-server/src/server.ts b/packages/rspack-dev-server/src/server.ts index 3506b9534d6..9cee8738c13 100644 --- a/packages/rspack-dev-server/src/server.ts +++ b/packages/rspack-dev-server/src/server.ts @@ -183,7 +183,7 @@ export class RspackDevServer extends WebpackDevServer { }); } } - } else if (compiler.options.builtins.react.refresh) { + } else if (compiler.options.builtins.react?.refresh) { if (mode === "production") { this.logger.warn( "React Refresh runtime should not be included in the production bundle.\n" +