Suggestion: case-sensitive imports
See original GitHub issueTypeScript Version: 2.7.0-dev.201xxxxx
My mac does not have case sensitive imports. That is you can import the file x.js
as ./X.js
and everything will work. However, our servers run on linux (like most) and I got a runtime exception that took down the whole server because linux imports are case sensitive.
I think this would be an awesome addition to Typescript to prevent fatal mistakes that are hard to catch like this one.
Related Issues:
Issue Analytics
- State:
- Created 6 years ago
- Reactions:64
- Comments:28 (8 by maintainers)
Top Results From Across the Web
Suggestion: option to enforce case sensitive imports ... - GitHub
The reason for that is that Windows is case insensitive with regards to import paths where the MAC is case sensitive. Since we...
Read more >Case-sensitive import statements in TypeScript
It turns out that import statements are case-insensitive on Mac and Windows but case-sensitive on Linux. There is a ...
Read more >Case-sensitive import statements in TypeScript
It turns out that import statements are case-insensitive on Mac and Windows but case-sensitive on Linux. There is a ...
Read more >TSConfig Reference - Docs on every TSConfig option
This allows the compiler to resolve relative module imports within these “virtual” directories, as if they were merged in to one directory. For...
Read more >Support migration from a case-sensitive database (including ...
NOTE: This suggestion is for Confluence Cloud. Using Confluence Server? See the corresponding suggestion. Different databases have different settings for case ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can I upvote this issue?
I spent hours trying to figure out why my TeamCity build was failing only to realize that the project had some imports that were the wrong case!
Quite an unexpected gotcha as I thought OSX would not import the file if it was the wrong case.
Make it opt-in with a flag like
enforceCaseSensitiveFileSystemWithSlowerCompilerPerformance
.