Skip to content

Commit

Permalink
Add documentation for the useCaseSensitiveFileNames option (#1227)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
berickson1 committed Dec 29, 2020
1 parent 566e6ce commit 8f2a509
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -62,6 +62,7 @@
+ [appendTsSuffixTo](#appendtssuffixto)
+ [appendTsxSuffixTo](#appendtsxsuffixto)
+ [onlyCompileBundledFiles](#onlycompilebundledfiles)
+ [useCaseSensitiveFileNames](#useCaseSensitiveFileNames)
+ [allowTsInNodeModules](#allowtsinnodemodules)
+ [context](#context)
+ [experimentalFileCaching](#experimentalfilecaching)
Expand Down Expand Up @@ -625,6 +626,15 @@ loading only those files that are actually bundled by webpack, as well as any `.
by the `tsconfig.json` settings. `.d.ts` files are still included because they may be needed for
compilation without being explicitly imported, and therefore not picked up by webpack.

#### useCaseSensitiveFileNames
| Type | Default Value |
|------|--------------|
| `boolean` | determined by typescript based on platform |

The default behavior of `ts-loader` is to act as a drop-in replacement for the `tsc` command,
so it respects the `useCaseSensitiveFileNames` set internally by typescript. The `useCaseSensitiveFileNames` option modifies this behavior,
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.

#### allowTsInNodeModules
| Type | Default Value |
|------|--------------|
Expand Down

0 comments on commit 8f2a509

Please sign in to comment.