microsoft / microsoft/TypeScript-Sublime-Plugin
Unexpected path behaviour from excluded file?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 236
- Avg merge
- 21d 13h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the tsconfig.json setup and the linked gist, then reproduce the excluded-directory behavior in the TypeScript Sublime Plugin. Compare path resolution for files inside and outside the excluded folder; done means determining whether the reported module-resolution failure is expected and identifying the relevant plugin behavior to change or document.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100