Skip to content

docs: update migration guide with pure ESM package info - #140

Merged
chenjiahan merged 1 commit into
mainfrom
pure_esm_doc_0309
Mar 9, 2026
Merged

chenjiahan merged 1 commit into
mainfrom
pure_esm_doc_0309

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 9, 2026 03:02
@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 updates the migration guide from v1 to v2 to include crucial information regarding the @rspack/dev-server package's transition to a pure ECMAScript Module (ESM) format. This change ensures users are aware of the new module type when migrating, helping them avoid potential compatibility issues.

Highlights

  • Documentation Update: Added a new section to the migrate-v1-to-v2.md guide detailing that @rspack/dev-server is now a pure ESM package.

🧠 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 new section 'Pure ESM package' to inform users that @rspack/dev-server is now published as a pure ESM package.
Activity
  • No 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 3df5212 into main Mar 9, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the pure_esm_doc_0309 branch March 9, 2026 03:02

@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 updates the migration guide to include information about the package now being pure ESM. This is an important breaking change to document. I've suggested an enhancement to the documentation to provide more context and a code example for users, which should make the migration process smoother for those using CommonJS.

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

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

## Pure ESM package

`@rspack/dev-server` is now published as **pure ESM** package.

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

This is a significant breaking change, and the current documentation is a bit too brief. To help users migrate smoothly, it would be beneficial to explicitly state that CommonJS require() is no longer supported and provide an example of how to switch to dynamic import().

Suggested change
`@rspack/dev-server` is now published as **pure ESM** package.
`@rspack/dev-server` is now published as a **pure ESM** package. CommonJS `require()` is no longer supported. You must use ESM `import` to load it.
If you are using `@rspack/dev-server`'s API in a CommonJS file, you will need to switch to dynamic `import()`:
```diff
- const { RspackDevServer } = require('@rspack/dev-server');
+ const { RspackDevServer } = await import('@rspack/dev-server');

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

Updates the v1→v2 migration guide to mention that @rspack/dev-server v2 is published as a pure ESM package, helping users understand module-system implications during upgrades.

Changes:

  • Added a “Pure ESM package” section to the migration guide.

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

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

`@rspack/dev-server` v2 is designed to work with Rspack v2. Rspack v1 is no longer supported in v2.

## Pure ESM package

Copilot AI Mar 9, 2026

Copy link

Choose a reason for hiding this comment

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

This new section sits under "## Breaking Changes", but it uses an H2 (##) heading while the other entries under this section use H3 (###). Please change this to "### Pure ESM package" (or otherwise align heading levels) to keep the document structure/TOC consistent.

Suggested change
## Pure ESM package
### Pure ESM package

Copilot uses AI. Check for mistakes.
Comment thread docs/migrate-v1-to-v2.md

## Pure ESM package

`@rspack/dev-server` is now published as **pure ESM** package.

Copilot AI Mar 9, 2026

Copy link

Choose a reason for hiding this comment

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

Grammar: "published as pure ESM package" is missing an article. Consider "published as a pure ESM package" (or rephrase to "published as pure ESM").

Suggested change
`@rspack/dev-server` is now published as **pure ESM** package.
`@rspack/dev-server` is now published as **a pure ESM** package.

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