Clarify mapMangledModule can be used for primitive values

This commit is contained in:
Nuckyz 2024-08-24 02:34:50 -03:00
parent a9a8c338a6
commit 8bfacc139a
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -464,6 +464,8 @@ export function findByFactoryCode<T = any>(...code: CodeFilter | [...CodeFilter,
* Find the module exports of the first module which the factory when stringified includes all the given code,
* then map them into an easily usable object via the specified mappers.
*
* IMPORTANT: mapMangledModule is the only way to webpack find primitive values, as long as you dont destructure them at top level.
*
* IMPORTANT: You can destructure the properties of the returned object at top level as long as the property filter does not return a primitive value export.
*
* @example