microsoft / microsoft/TypeScript-Sublime-Plugin

Unexpected path behaviour from excluded file?

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

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
1.7k
Fork
236
Merge medio
21g 13h
PR unite (30g)
1

Descrizione

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.

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

Inizia esaminando la configurazione di tsconfig.json e il gist collegato, quindi riproduci il comportamento della directory esclusa nel TypeScript Sublime Plugin. Confronta la risoluzione dei percorsi per i file all'interno e all'esterno della cartella esclusa; il lavoro è completato quando hai determinato se il problema segnalato di risoluzione dei moduli è previsto e hai identificato il comportamento rilevante del plugin da modificare o documentare.

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

Valutazione

Stack tecnologico
javascript, typescript
Ambito
developer-experience, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.