webpack Build Performance Tips
- Limit the number of extensions passed to the resolver
- Be careful with usage of
Limit the number of extensions passed to the resolver
When the resolver is working through its version of the node module resolution algorithm, it has to perform a large number of file system operations to determine what an ambiguous require/import string is. This means, every extension webpack needs to look for can drastically increase the number of disk hits necessary when
enhanced-resolve is attempting to locate an import.