Skip to content
This repository was archived by the owner on Sep 2, 2023. It is now read-only.
This repository was archived by the owner on Sep 2, 2023. It is now read-only.

Executing loader hook functions #518

@coreyfarrell

Description

@coreyfarrell

istanbuljs/nyc#1320 will add rudimentary support for nyc --all including ES modules. I think to complete support I need the ability to retrieve the source which would eventually be executed for an import() of an absolute file URL without actually executing it.

I'm not sure how much of the loader hook API is needed. For example a single async function esmGetSource(specifier, context) would be enough to support what nyc needs. I'm not sure if other potential users would need the individual loader hook functions to run each step of resolve, getFormat, getSource and finally transformSource. nyc would need to know the context.url given to transformSource as well as the source code produced after transformSource ran.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions