Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#16 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
20
Fork
13
Merge medio
3h 18m
PR unite (30g)
3

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rstackjs/rspack-plugin-react-refresh

Tutte le issue di rstackjs/rspack-plugin-react-refresh

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.