Skip to content

docs: add migration guide for v2 - #125

Merged
chenjiahan merged 1 commit into
mainfrom
migration_guide_0305
Mar 5, 2026
Merged

chenjiahan merged 1 commit into
mainfrom
migration_guide_0305

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Add comprehensive migration documentation covering breaking changes when upgrading from v1 to v2, including Node.js version requirements, dependency updates, and removed features.

Copilot AI review requested due to automatic review settings March 5, 2026 01:20
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a comprehensive migration guide for users upgrading @rspack/dev-server from version 1 to version 2. The guide outlines significant breaking changes, including updated Node.js and Rspack version requirements, major dependency upgrades like http-proxy-middleware and Express, and the removal of features such as spdy, SockJS, and Bonjour support. It also details necessary reconfigurations due to naming convention changes from webpack-dev-server to rspack-dev-server.

Highlights

  • Node.js Version Support: Dropped support for Node.js 18, with the minimum supported version now being ^20.19.0 || >=22.12.0.
  • Rspack Compatibility: Removed support for Rspack v1; @rspack/dev-server v2 is exclusively designed to work with Rspack v2.
  • Dependency Upgrades: Upgraded http-proxy-middleware to v3 and Express to v5, introducing several breaking changes in their configuration and usage.
  • Feature Removals: Eliminated support for spdy, SockJS, and built-in Bonjour functionality.
  • Naming Convention Changes: Renamed all webpack-dev-server-* references to rspack-dev-server-* across environment variables, URL query flags, and built-in routes.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • docs/migrate-v1-to-v2.md
    • Added a comprehensive migration guide for @rspack/dev-server from v1 to v2.
Activity
  • No significant human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@chenjiahan
chenjiahan merged commit 9afb4d6 into main Mar 5, 2026
4 of 5 checks passed
@chenjiahan
chenjiahan deleted the migration_guide_0305 branch March 5, 2026 01:21

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a comprehensive migration guide for upgrading from v1 to v2 of @rspack/dev-server. The guide is well-structured and covers key breaking changes, including Node.js version requirements, dependency updates, and removed features. I've identified a minor formatting issue and an area where the explanation could be clearer for users.

Note: Security Review has been skipped due to the limited scope of the PR.

Comment thread docs/migrate-v1-to-v2.md
Comment on lines +51 to +52
- When `bypass` was used and that function returned a boolean, it would automatically result in a 404 request. This can’t be achieved in a similar way now, or, if it returned a string, you can do what was done in the example above.
- `bypass` also allowed sending data; this can no longer be done. If you really need to do it, you’d have to create a new route in the proxy that sends the same data, or alternatively create a new route on the main server and, following the example above, send the data you wanted.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The references to "the example above" on lines 51 and 52 are a bit confusing, as the preceding examples are for proxy[].path and logLevel, not for replacing bypass. To improve clarity, consider rephrasing to avoid referring to an unrelated example, or provide a small example for using pathFilter or router as a replacement for bypass if possible.

Comment thread docs/migrate-v1-to-v2.md

### Upgraded Express to v5

`express`` has been updated to v5, see [Introducing Express v5: A New Era for the Node.js Framework](https://expressjs.com/2024/10/15/v5-release.html) for details.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

There's a small formatting typo here. The extra backtick breaks the code formatting for express.

Suggested change
`express`` has been updated to v5, see [Introducing Express v5: A New Era for the Node.js Framework](https://expressjs.com/2024/10/15/v5-release.html) for details.
`express` has been updated to v5, see [Introducing Express v5: A New Era for the Node.js Framework](https://expressjs.com/2024/10/15/v5-release.html) for details.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a dedicated migration guide to help users upgrade @rspack/dev-server from v1 to v2 by documenting breaking changes and replacement configuration patterns.

Changes:

  • Document Node.js engine requirement changes (dropping Node 18).
  • Document dependency-related breaking changes (e.g., http-proxy-middleware v3, Express v5).
  • Document removed/renamed features and configuration (e.g., spdy, SockJS, Bonjour, /rspack-dev-server/* routes & query flags).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/migrate-v1-to-v2.md

### Upgraded Express to v5

`express`` has been updated to v5, see [Introducing Express v5: A New Era for the Node.js Framework](https://expressjs.com/2024/10/15/v5-release.html) for details.

Copilot AI Mar 5, 2026

Copy link

Choose a reason for hiding this comment

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

There’s an extra backtick in the inline code formatting for the Express package name; it renders incorrectly as `express``.

Suggested change
`express`` has been updated to v5, see [Introducing Express v5: A New Era for the Node.js Framework](https://expressjs.com/2024/10/15/v5-release.html) for details.
`express` has been updated to v5, see [Introducing Express v5: A New Era for the Node.js Framework](https://expressjs.com/2024/10/15/v5-release.html) for details.

Copilot uses AI. Check for mistakes.
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