Skip to content

__requireExports for exclusive exports, rather than inclusive. #2

@mekanoe

Description

@mekanoe

Currently, "inclusive" mode will return all bare functions in a file before injecting __requireModuleClasses. This might not be ideal for some developers.

This change, __requireExports, and in contingent API module.exports, will allow a developer change what gets exported from everything in a module (including possibly dangerous or useless functions) into very specific exports.

This should still accept __requireModuleClasses and should also follow the same return handling, however, __requireModuleClasses will overwrite any exclusive exports of the same key.

In the case of the contingent API, module.exports (including primary API) should accept an object, function returning an object or class. This is to maintain extended parity to CommonJS modules.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions