File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,7 +74,9 @@ added: REPLACEME
7474
7575> Stability: 1.1 - Active development
7676
77- * ` specifier` {string|URL} The module specifier or URL to clear.
77+ * ` specifier` {string|URL} The module specifier or URL to resolve. The resolved URL/filename
78+ is cleared from the load cache; the specifier (with ` parentURL` and ` importAttributes` )
79+ is cleared from the resolve cache.
7880* ` options` {Object}
7981 * ` mode` {string} Which caches to clear. Supported values are ` ' all' ` , ` ' commonjs' ` , and ` ' module' ` .
8082 **Default:** ` ' all' ` .
@@ -88,8 +90,9 @@ Clears the CommonJS `require` cache and/or the ESM module cache for a module. Th
8890reload patterns similar to deleting from ` require.cache` in CommonJS, and is useful for HMR.
8991When ` mode` is ` ' all' ` , resolution failures for one module system do not throw; check the
9092returned flags to see what was cleared.
91- This also clears internal resolution caches for the resolved module. Clearing a module does
92- not clear cached entries for its dependencies.
93+ This also clears resolution cache entries for that specifier. Clearing a module does not clear
94+ cached entries for its dependencies, and other specifiers that resolve to the same target may
95+ remain.
9396When a ` file:` URL is resolved, cached module jobs for the same file path are cleared even if
9497they differ by search or hash.
9598
You can’t perform that action at this time.
0 commit comments