Skip to content

Compatibility with esbuild #16

Closed
Closed
@ohana54

Description

@ohana54

Hi,
We started using esbuild, a new super fast JS compiler, and it doesn't support or intends to support dynamic requires. This means we can't use pidtree due to this line:

var list = require('./' + file);

Would you consider changing it? One solution would be to replace it with an explicit switch case with the file names, or even add something like this (rough code):

var methodToRequireFn = {
  ps: () => require("./ps"),
  wmic: () => require("./wmic")
};

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions