solidjs / solidjs/solid-vite-plugin
I updated `vite-plugin-solid` and now namespaces merged with components are no longer allowed
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 520
- Forks
- 70
- Ø Merge
- 23 Std. 35 Min.
- Gemergte PRs (30 T.)
- 39
Beschreibung
Describe the bug
If I create a .tsx file with this content
function A() {
return <>1</>
}
namespace A {
export const a = 1;
}
console.log(A);
It throws this error when I load the page (Running vite dev)
Transform failed with 1 error:
ERROR: The symbol "A" has already been declared
I tried downgrading vite-plugin-solid and it worked
npm i vite-plugin-solid@2.8.0
(On the playground it always works)
Your Example Website or App
(localhost)
Steps to Reproduce the Bug or Issue
- Put a merged namespace declaration WITH A COMPONENT somewhere
- Run
vite dev - Go to the web page
Expected behavior
I expected this allowed TS syntax to not stop working
Screenshots or Videos
No response
Platform
- OS: Windows
- Browser: Edge
- Version: 120.0.2210.77
Additional context
No response
Beitragsleitfaden
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
Beginne mit dem bereitgestellten .tsx-Beispiel, das eine Komponente und einen zusammengeführten Namespace enthält, und führe dann vite dev aus, um den Transformationsfehler zu reproduzieren. Vergleiche das Verhalten mit vite-plugin-solid@2.8.0; abgeschlossen ist die Aufgabe, wenn die TypeScript-Syntax in der aktuellen Plugin-Version ohne den Fehler wegen doppelter Symbole geladen wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript, vite
- Bereich
- build-system
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100