Skip to content

Commit 8f2a509

Browse files
authored
Add documentation for the useCaseSensitiveFileNames option (#1227)
Setting this option on projects with lots of files can reduce compilation time. Case-insensitivty requires normalization of file paths, which involves executing regex's. This shows up in the hot path of compilation profiling.
1 parent 566e6ce commit 8f2a509

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
+ [appendTsSuffixTo](#appendtssuffixto)
6363
+ [appendTsxSuffixTo](#appendtsxsuffixto)
6464
+ [onlyCompileBundledFiles](#onlycompilebundledfiles)
65+
+ [useCaseSensitiveFileNames](#useCaseSensitiveFileNames)
6566
+ [allowTsInNodeModules](#allowtsinnodemodules)
6667
+ [context](#context)
6768
+ [experimentalFileCaching](#experimentalfilecaching)
@@ -625,6 +626,15 @@ loading only those files that are actually bundled by webpack, as well as any `.
625626
by the `tsconfig.json` settings. `.d.ts` files are still included because they may be needed for
626627
compilation without being explicitly imported, and therefore not picked up by webpack.
627628

629+
#### useCaseSensitiveFileNames
630+
| Type | Default Value |
631+
|------|--------------|
632+
| `boolean` | determined by typescript based on platform |
633+
634+
The default behavior of `ts-loader` is to act as a drop-in replacement for the `tsc` command,
635+
so it respects the `useCaseSensitiveFileNames` set internally by typescript. The `useCaseSensitiveFileNames` option modifies this behavior,
636+
by changing the way in which ts-loader resolves file paths to compile. Setting this to true can have some performance benefits due to simplifying the file resolution codepath.
637+
628638
#### allowTsInNodeModules
629639
| Type | Default Value |
630640
|------|--------------|

0 commit comments

Comments
 (0)