chore: update references from webpack to Rspack#97
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8dfc1987ce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s wording and identifiers to prefer “Rspack” over “webpack”, aligning documentation/comments and a few internal parameter names with the @rspack/plugin-react-refresh branding.
Changes:
- Updated a splitChunks cacheGroup test regex used by the test harness.
- Renamed some runtime parameter names (e.g.,
webpackHot→hot) and adjusted related comments/JSDoc. - Removed a webpack-specific explanatory comment in the plugin entrypoint.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/test.spec.ts | Updates the chunk-matching regex used to create/read the react-refresh output chunk in tests. |
| src/index.ts | Removes webpack-specific comments near the development-mode gate. |
| client/refreshUtils.js | Updates JSDoc/comments to say “Rspack” and renames the HMR parameter to hot. |
| client/reactRefresh.js | Renames the HMR parameter to hot and updates the call into executeRuntime. |
Comments suppressed due to low confidence (1)
client/refreshUtils.js:24
- The JSDoc now describes
moduleId/exports as coming from “Rspack module” objects, but this file still relies on the webpack-compatible runtime API (/* global __webpack_require__ */and__webpack_require__.c[moduleId]). Consider updating the wording to reflect that these are webpack-compatible module IDs/exports (as implemented by Rspack), to avoid confusing readers and consumers.
/**
* Extracts exports from a Rspack module object.
* @param {string} moduleId An Rspack module ID.
* @returns {*} An exports object from the module.
*/
function getModuleExports(moduleId) {
if (typeof moduleId === 'undefined') {
// `moduleId` is unavailable, which indicates that this module is not in the cache,
// which means we won't be able to capture any exports,
// and thus they cannot be refreshed safely.
// These are likely runtime or dynamically generated modules.
return {};
}
var maybeModule = __webpack_require__.c[moduleId];
if (typeof maybeModule === 'undefined') {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replaced all references to "webpack" with "Rspack"