microsoft / microsoft/TypeScript-Sublime-Plugin

Unexpected path behaviour from excluded file?

Offen
#523 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
JavaScript
Sterne
1.7k
Forks
236
Ø Merge
21 T. 13 Std.
Gemergte PRs (30 T.)
1

Beschreibung

TL;DR;
Opening a file from a tsconfig.json excluded directory in sublime doesn't resolve project files. But most of the other typescript features seems to be working... Is this expected behaviour? Or am I doing something terribly wrong?

First of all, thanks for the wonderful TypeScript and the Sublime plugin! It has been a pleasure to work with.

So I was setting up a simple project structure with TypeScript, Webpack, Mocha and React. The usual basics. When I created my first component everything went well and I got a fair build time; 2 seconds. Unfortunately after creating a (unit) test for this component, the build time soared to 20+ seconds...

After some investigation I found out that TypeScript parsed all the testing dependencies, even though Webpack did not include the /test folder for the loader. But I think that is expected behaviour, since they stated that the tsconfig.json's exclude is used.

Because of this, I added the whole testing folder to the exclude array. But after doing so, Sublime does not resolve the path to the component anymore. Instead it states Cannot find module 'app/components/test'. All other functionality seems to be working, autocompletion, typehinting, etc. Any input or even telling me I'm completely wrong is appreciated!

PS. All used files are available over here. Please note, I could not use directories so I used - as fake directory separator.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginnen Sie mit der Durchsicht der Einrichtung von tsconfig.json und des verlinkten gist, und reproduzieren Sie anschließend das Verhalten des ausgeschlossenen Verzeichnisses im TypeScript Sublime Plugin. Vergleichen Sie die Pfadauflösung für Dateien innerhalb und außerhalb des ausgeschlossenen Ordners; abgeschlossen ist die Aufgabe, wenn Sie festgestellt haben, ob der gemeldete Fehler bei der Modulauflösung erwartungsgemäß ist, und das relevante Plugin-Verhalten identifiziert haben, das geändert oder dokumentiert werden muss.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, typescript
Bereich
developer-experience, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.