TypeStrong / TypeStrong/ts-loader
ES2015 module issue with transpileOnly + decorators + interfaces
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 3.5k
- Forks
- 439
- Ø Merge
- 17 Std. 17 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
Hi there,
We have a very large Angular 2 codebase that we're attempting to move over to ts-loader; we're getting massive (4-5x) speed boosts compared to our existing awesome-typescript-loader setup, but sadly we're getting compilation issues when we turn on transpileOnly.
It only occurs when:
- Building ES2015 modules AND
- Using a class with a decorator on it AND
- The class uses an imported interface AND
- The imported interface comes from a module that also exports something concrete (e.g. a class or a const)
(webpack complains that it can't find the interface with a stack trace suggesting that it's processing harmony imports.)
I've created a repo with a standalone repro case in it: it's just tiny 2 files both of which are under 10 lines of code:
https://github.com/RoystonS/ts-loader-issue
(Is this related to what's discussed in issue #400?)
Thanks,
Royston.
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 der eigenständigen Zwei-Dateien-Reproduktion unter github.com/RoystonS/ts-loader-issue und führe ihren webpack-Build mit aktiviertem transpileOnly aus. Reproduziere den Fehler mit ES2015-Modulen, einer dekorierten Klasse und einem importierten Interface aus einem Modul, das außerdem einen konkreten Wert exportiert; abgeschlossen ist die Aufgabe, wenn diese Kombination ohne den Fehler bezüglich des fehlenden Interface oder den harmony-import-Fehler kompiliert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript, webpack
- Bereich
- build-system, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100