Skip to content

chore: update references from webpack to Rspack#97

Merged
chenjiahan merged 2 commits intomainfrom
update_refs_0407
Apr 8, 2026
Merged

chore: update references from webpack to Rspack#97
chenjiahan merged 2 commits intomainfrom
update_refs_0407

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Replaced all references to "webpack" with "Rspack"

Copilot AI review requested due to automatic review settings April 7, 2026 14:17
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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., webpackHothot) 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.

@chenjiahan chenjiahan merged commit 6815c62 into main Apr 8, 2026
4 checks passed
@chenjiahan chenjiahan deleted the update_refs_0407 branch April 8, 2026 02:19
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