Skip to content

Add support for @datadog/pprof #410

@austinwoon

Description

@austinwoon

When building with output: standalone, @datadog/pprof prebuilds gets excluded as the current AST logic introduced in #391 does not handle the case where imports are assigned to a const.

See @datadog/pprof codebase here on how they assign the CJS import of node-gyp-build to a variable, that way we cannot resolve the name to node-gyp-build just by inferring the AST node's first argument

Suggested solution

Instead of modifying the conditionals to handle this case like in #391, just add a special case for @datadog/pprof to include the prebuilds folder. I have a fix up and will discuss the alternative in more detail here

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