You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9b434b2
Browse filesBrowse the repository at this point in the historyBrowse files
module: avoid reparsing package.json in esm format detection
Determining the format of a `.js` or `.ts` module called
`getPackageScopeConfig()`, which spread the deserialized package
configuration and thereby invoked its lazy `exports` and `imports`
getters. Every resolved module parsed those maps again, so load time
and memory grew with the number of modules in a package times the
size of its `exports` map.
Use `getPackageType()` for format detection and only look up the
package.json path when warning about a typeless package. Stop
spreading the configuration in `getPackageScopeConfig()` so that the
maps are parsed only when accessed.
Fixes: #66485
Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
PR-URL: #66982
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
0 commit comments