rstackjs / rstackjs/rspack-plugin-react-refresh

RESULT_CODE_HUNG when updating translation files

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

Nessuno ha ancora preso questa issue.

Lingua principale
TypeScript
Stelle
20
Fork
13
Merge medio
2h 55m
PR unite (30g)
6

Descrizione

I'm working on migrating a fairly large project to rspack and one blocker they had with webpack was enabling Fast Refresh. There is a known issue that Rspack seems to have solved around circular dependencies, https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/190.

However, when I enable this plugin for our repo and make changes to any of our translation files, we have a few pages that hang and are completely unresponsive. The basic structure of our app is

pages/
  - page1.tsx
  - strings.ts
i18n/
  - en.json

where strings.ts is something like

export const title = i18n.t('<key-of-en.json>');

I'd expect the page to either do a full refresh or not hang. There are no useful logs in either the browser or rspack. An example response from the hot reload chunk is

{
c: ["main"],
r: [],
m: []
}

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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.

Direzione di ricerca

Reproduce the hang using pages/page1.tsx, strings.ts, and i18n/en.json, starting with an edit to the translation file while Fast Refresh is enabled. Inspect the hot reload chunk response and compare the behavior with a full refresh; done means the page remains responsive and either refreshes correctly or falls back to a full refresh.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.