7bbc1aec9a
The current `setTimeout` logic adds a constant overhead of 30ms when applying updates, which slows down HMR. As @sokra suggested, we can use the `addStatusHandler` API to have the HMR runtime let us know when its status changes. This also switches to `Promise.resolve` for update aggregation. |
||
---|---|---|
.. | ||
internal | ||
.gitignore | ||
loader.ts | ||
package.json | ||
ReactRefreshWebpackPlugin.ts | ||
README.md | ||
runtime.ts | ||
tsconfig.json |
@next/react-refresh-utils
This is an experimental package that provides utilities for React Refresh.
Its API is not stable as that of Next.js, nor does it follow semver rules.
Use it at your own risk.
Usage
All entrypoints below must wired into your build tooling for this to work.