Skip to content

Performance degradation when use with tsconfig-paths after require-in-the-middle@7.5.0 #114

@pilaoda

Description

@pilaoda

seems caused by tsconfig-paths override Module._resolveFilename
https://github.com/dividab/tsconfig-paths/blob/098e066632f5b9f35c956803fe60d17ffc60b688/src/register.ts#L106

nodejs builtin resolve will call Module._resolveFilename again. This behavior introduced in #96.

return require.resolve(moduleName, { paths: [basedir] })

Maybe we can provide a config or environment variable to force use require('resolve').sync() ?

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