Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`sockIntegration: 'whm'` may inject `webpack-hot-middleware/client` twice

Đang mở
#16 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Start by tracing the sockIntegration: 'whm' handling and compare it with the prior-art implementation linked in the issue. Reproduce the rspack.config.js scenario with an explicit webpack-hot-middleware/client entry, then verify that the generated bundle contains only one client entry.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

If end-user provide webpack-hot-middleware/client explicitly in the entry. this plugin should skip to inject it.

Scenario
// `rspack.config.js`

export default {
    // ...

    entry: {
	    application: [
		    './src/app.js'
            'webpack-hot-middleware/client?overlay=false&quiet=true',
        ]
    },

    // ...
}

In this case, the output bundle be like below

// ...

function(__webpack_require__) {
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId) }
__webpack_require__.O(0, ["common",], function() {
        return __webpack_exec__("./node_modules/@rspack/plugin-react-refresh/client/reactRefreshEntry.js"),
             __webpack_exec__("./node_modules/webpack-hot-middleware/client.js"),
             // ^ Injected by this plugin
             __webpack_exec__("./node_modules/@rspack/plugin-react-refresh/client/errorOverlayEntry.js"),
             __webpack_exec__("./src/app.js"),
             __webpack_exec__("./node_modules/webpack-hot-middleware/client.js?overlay=false&quiet=true");
             // ^ Provided by the config
      });
var __webpack_exports__ = __webpack_require__.O();

}
// ...
Prior art

https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/lib/index.js#L82-L98

Ngôn ngữ chính
TypeScript
Star
20
Fork
13
Merge trung bình
2 giờ 55 phút
Pull request đã merge (30 ngày)
6

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rstackjs/rspack-plugin-react-refresh

Tất cả issue của rstackjs/rspack-plugin-react-refresh

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.