docs: update migration guide with pure ESM package info - #140
Conversation
Summary of ChangesHello, 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 Highlights
🧠 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
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
|
|
||
| ## Pure ESM package | ||
|
|
||
| `@rspack/dev-server` is now published as **pure ESM** package. |
There was a problem hiding this comment.
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().
| `@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'); |
There was a problem hiding this comment.
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.
|
|
||
| `@rspack/dev-server` v2 is designed to work with Rspack v2. Rspack v1 is no longer supported in v2. | ||
|
|
||
| ## Pure ESM package |
There was a problem hiding this comment.
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.
| ## Pure ESM package | |
| ### Pure ESM package |
|
|
||
| ## Pure ESM package | ||
|
|
||
| `@rspack/dev-server` is now published as **pure ESM** package. |
There was a problem hiding this comment.
Grammar: "published as pure ESM package" is missing an article. Consider "published as a pure ESM package" (or rephrase to "published as pure ESM").
| `@rspack/dev-server` is now published as **pure ESM** package. | |
| `@rspack/dev-server` is now published as **a pure ESM** package. |
No description provided.