Uncaught ReferenceError: $RefreshReg$ is not defined

1 week ago 21
ARTICLE AD BOX

When using rspack with typescript and React to run in development mode, the following error is thrown:

Uncaught ReferenceError: $RefreshReg$ is not defined

I've created an example project here:
https://github.com/AMI3GOLtd/hmr-error

To run...

yarn install yarn start

Error can be seen in the browser console.

I've tried disabling HMR.

Any help is appretiated!

Read Entire Article