chore: rename from webpack-dev-middleware to @rspack/dev-middleware#7
chore: rename from webpack-dev-middleware to @rspack/dev-middleware#7chenjiahan merged 1 commit intomainfrom
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 rebrands the development middleware package from webpack-dev-middleware to @rspack/dev-middleware. The primary goal is to reflect its transition and compatibility with the Rspack build tool, ensuring that all references, documentation, and package metadata are consistent with the new naming convention. This change clarifies the package's purpose and integration within the Rspack ecosystem. 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 package name and documentation from webpack-dev-middleware to @rspack/dev-middleware. The changes are mostly in documentation and configuration files like package.json.
I've found a critical typo in the new repository/organization name (rstackjs instead of rspackjs) across multiple files, which will lead to broken links and incorrect repository references. I've also pointed out some minor inconsistencies in code comments within the README.md for better clarity. Please address these points.
| { | ||
| "devDependencies": { | ||
| "webpack-dev-middleware": "webpack/webpack-dev-middleware#{id}/head" | ||
| "@rspack/dev-middleware": "rstackjs/rspack-dev-middleware#{id}/head" |
There was a problem hiding this comment.
There seems to be a typo in the organization name. It should be rspackjs instead of rstackjs to match the @rspack/dev-middleware package's organization.
| "@rspack/dev-middleware": "rstackjs/rspack-dev-middleware#{id}/head" | |
| "@rspack/dev-middleware": "rspackjs/rspack-dev-middleware#{id}/head" |
| [tests]: https://github.com/rstackjs/rspack-dev-middleware/actions/workflows/test.yml/badge.svg | ||
| [tests-url]: https://github.com/rstackjs/rspack-dev-middleware/actions | ||
| [cover]: https://codecov.io/gh/rstackjs/rspack-dev-middleware/branch/main/graph/badge.svg | ||
| [cover-url]: https://codecov.io/gh/rstackjs/rspack-dev-middleware | ||
| [discussion]: https://img.shields.io/github/discussions/webpack/webpack | ||
| [discussion-url]: https://github.com/webpack/webpack/discussions | ||
| [size]: https://packagephobia.com/badge?p=webpack-dev-middleware | ||
| [size-url]: https://packagephobia.com/result?p=webpack-dev-middleware | ||
| [docs-url]: https://webpack.js.org/guides/development/#using-webpack-dev-middleware | ||
| [size]: https://packagephobia.com/badge?p=%40rspack%2Fdev-middleware | ||
| [size-url]: https://packagephobia.com/result?p=%40rspack%2Fdev-middleware | ||
| [docs-url]: https://github.com/rstackjs/rspack-dev-middleware#readme | ||
| [hash-url]: https://twitter.com/search?q=webpack | ||
| [middleware-url]: https://github.com/webpack/webpack-dev-middleware | ||
| [stack-url]: https://stackoverflow.com/questions/tagged/webpack-dev-middleware | ||
| [middleware-url]: https://github.com/rstackjs/rspack-dev-middleware | ||
| [stack-url]: https://stackoverflow.com/questions/tagged/rspack-dev-middleware |
There was a problem hiding this comment.
There seems to be a typo in the organization name in several URLs. It should be rspackjs instead of rstackjs.
| [tests]: https://github.com/rstackjs/rspack-dev-middleware/actions/workflows/test.yml/badge.svg | |
| [tests-url]: https://github.com/rstackjs/rspack-dev-middleware/actions | |
| [cover]: https://codecov.io/gh/rstackjs/rspack-dev-middleware/branch/main/graph/badge.svg | |
| [cover-url]: https://codecov.io/gh/rstackjs/rspack-dev-middleware | |
| [discussion]: https://img.shields.io/github/discussions/webpack/webpack | |
| [discussion-url]: https://github.com/webpack/webpack/discussions | |
| [size]: https://packagephobia.com/badge?p=webpack-dev-middleware | |
| [size-url]: https://packagephobia.com/result?p=webpack-dev-middleware | |
| [docs-url]: https://webpack.js.org/guides/development/#using-webpack-dev-middleware | |
| [size]: https://packagephobia.com/badge?p=%40rspack%2Fdev-middleware | |
| [size-url]: https://packagephobia.com/result?p=%40rspack%2Fdev-middleware | |
| [docs-url]: https://github.com/rstackjs/rspack-dev-middleware#readme | |
| [hash-url]: https://twitter.com/search?q=webpack | |
| [middleware-url]: https://github.com/webpack/webpack-dev-middleware | |
| [stack-url]: https://stackoverflow.com/questions/tagged/webpack-dev-middleware | |
| [middleware-url]: https://github.com/rstackjs/rspack-dev-middleware | |
| [stack-url]: https://stackoverflow.com/questions/tagged/rspack-dev-middleware | |
| [tests]: https://github.com/rspackjs/rspack-dev-middleware/actions/workflows/test.yml/badge.svg | |
| [tests-url]: https://github.com/rspackjs/rspack-dev-middleware/actions | |
| [cover]: https://codecov.io/gh/rspackjs/rspack-dev-middleware/branch/main/graph/badge.svg | |
| [cover-url]: https://codecov.io/gh/rspackjs/rspack-dev-middleware | |
| [discussion]: https://img.shields.io/github/discussions/webpack/webpack | |
| [discussion-url]: https://github.com/webpack/webpack/discussions | |
| [size]: https://packagephobia.com/badge?p=%40rspack%2Fdev-middleware | |
| [size-url]: https://packagephobia.com/result?p=%40rspack%2Fdev-middleware | |
| [docs-url]: https://github.com/rspackjs/rspack-dev-middleware#readme | |
| [hash-url]: https://twitter.com/search?q=webpack | |
| [middleware-url]: https://github.com/rspackjs/rspack-dev-middleware | |
| [stack-url]: https://stackoverflow.com/questions/tagged/rspack-dev-middleware |
| "homepage": "https://github.com/rstackjs/rspack-dev-middleware", | ||
| "bugs": "https://github.com/rstackjs/rspack-dev-middleware/issues", | ||
| "repository": "rstackjs/rspack-dev-middleware", |
There was a problem hiding this comment.
There seems to be a typo in the organization name in the homepage, bugs, and repository URLs. It should be rspackjs instead of rstackjs.
| "homepage": "https://github.com/rstackjs/rspack-dev-middleware", | |
| "bugs": "https://github.com/rstackjs/rspack-dev-middleware/issues", | |
| "repository": "rstackjs/rspack-dev-middleware", | |
| "homepage": "https://github.com/rspackjs/rspack-dev-middleware", | |
| "bugs": "https://github.com/rspackjs/rspack-dev-middleware/issues", | |
| "repository": "rspackjs/rspack-dev-middleware", |
| app.use( | ||
| middleware(compiler, { | ||
| // webpack-dev-middleware options | ||
| // options |
| const compiler = webpack(webpackConfig); | ||
| const devMiddlewareOptions = { | ||
| /** Your webpack-dev-middleware-options */ | ||
| // options |
| const compiler = webpack(webpackConfig); | ||
| const devMiddlewareOptions = { | ||
| /** Your webpack-dev-middleware-options */ | ||
| // options |
| const compiler = webpack(webpackConfig); | ||
| const devMiddlewareOptions = { | ||
| /** Your webpack-dev-middleware-options */ | ||
| // options |
|
|
||
| await server.register({ | ||
| plugin: devMiddleware.hapiPlugin(), | ||
| plugin: devMiddleware.hapiWrapper(), |
| const compiler = webpack(webpackConfig); | ||
| const devMiddlewareOptions = { | ||
| /** Your webpack-dev-middleware-options */ | ||
| // options |
| const compiler = webpack(webpackConfig); | ||
| const devMiddlewareOptions = { | ||
| /** Your webpack-dev-middleware-options */ | ||
| // options |
There was a problem hiding this comment.
Pull request overview
Renames the package and updates documentation/repository metadata to reflect the transition from webpack-dev-middleware to @rspack/dev-middleware.
Changes:
- Renamed the npm package to
@rspack/dev-middlewareand updated repository/homepage/bugs metadata. - Updated README installation/usage examples and badge links to the new package/repo.
- Updated contributing docs to reference the new package and repo for PR testing.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| package.json | Updates package name/description and repo metadata to rstackjs/rspack-dev-middleware. |
| package-lock.json | Updates lockfile root package name to match the new scoped name. |
| README.md | Renames the project in docs, updates install/require examples, and updates various repo/badge links. |
| CONTRIBUTING.md | Renames the project heading and updates the example dependency to the new repo/package. |
Comments suppressed due to low confidence (1)
package.json:17
homepage/bugs/repositorywere updated to the new repo, butfunding.urlstill points to the webpack OpenCollective. If this package has moved to the Rspack org, update (or remove) the funding link so it doesn't direct users to the wrong project.
"repository": "rstackjs/rspack-dev-middleware",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [discussion]: https://img.shields.io/github/discussions/webpack/webpack | ||
| [discussion-url]: https://github.com/webpack/webpack/discussions | ||
| [size]: https://packagephobia.com/badge?p=webpack-dev-middleware | ||
| [size-url]: https://packagephobia.com/result?p=webpack-dev-middleware | ||
| [docs-url]: https://webpack.js.org/guides/development/#using-webpack-dev-middleware | ||
| [size]: https://packagephobia.com/badge?p=%40rspack%2Fdev-middleware | ||
| [size-url]: https://packagephobia.com/result?p=%40rspack%2Fdev-middleware |
| # Contributing in @rspack/dev-middleware | ||
|
|
||
| We'd always love contributions to further improve the webpack / webpack-contrib ecosystem! | ||
| Here are the guidelines we'd like you to follow: |
| { | ||
| "devDependencies": { | ||
| "webpack-dev-middleware": "webpack/webpack-dev-middleware#{id}/head" | ||
| "@rspack/dev-middleware": "rstackjs/rspack-dev-middleware#{id}/head" |
| [middleware-url]: https://github.com/rstackjs/rspack-dev-middleware | ||
| [stack-url]: https://stackoverflow.com/questions/tagged/rspack-dev-middleware | ||
| [chat-url]: https://github.com/webpack/webpack/discussions | ||
| [wjo-url]: https://github.com/webpack/webpack.js.org |
| [![size][size]][size-url] | ||
|
|
||
| # webpack-dev-middleware | ||
| # @rspack/dev-middleware | ||
|
|
||
| An express-style development middleware for use with [Rspack](https://rspack.rs) and webpack-compatible compilers. It serves the files emitted by the compiler from memory. |
| ## API | ||
|
|
||
| `webpack-dev-middleware` also provides convenience methods that can be use to | ||
| `@rspack/dev-middleware` also provides convenience methods that can be use to |
| [tests]: https://github.com/rstackjs/rspack-dev-middleware/actions/workflows/test.yml/badge.svg | ||
| [tests-url]: https://github.com/rstackjs/rspack-dev-middleware/actions |
Update package name, documentation, and references to reflect the transition from webpack-dev-middleware to @rspack/dev-middleware. This includes updating package.json, README.md, and CONTRIBUTING.md files to reference the new package name and repository.