rstackjs / rstackjs/rspack-plugin-react-refresh
`sockIntegration: 'whm'` may inject `webpack-hot-middleware/client` twice
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 20
- Forks
- 13
- Ø Merge
- 2 Std. 55 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
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
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 52/100