Open
Description
Make lib
Replacement Opt-In by Default
- Since TypeScript 4.5, we've supported loading
lib
files fromnode_modules
if something is located in@typescript/lib-*
. - But this lib replacement is on for everyone by default, and that leads to us
- doing a whole bunch of module resolution all the time at project load going up the spine
- add file watchers for each of the directories that don't exist.
- This is a perf hit for everyone (and it's noisy to look at when diagnosing issues) so we want to make it opt-in.
- According to a rudimentary search, 352 files across all of GitHub use a custom
dom
. Limited impact? - 2 major groups who originally asked for this?
- People who need to lock on an older
dom
file like@types/web
. - People who want a custom version of the built-in lib.
- People who need to lock on an older
- How do we roll this out?
- Introduce this in 5.8, and then make it the default in 6.0.