Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM: Fix importing index.js files by folder name #4666

Closed
wants to merge 1 commit into from
Closed

ESM: Fix importing index.js files by folder name #4666

wants to merge 1 commit into from

Commits on Jun 23, 2021

  1. ESM: Fix importing index.js files by folder name

    As pointed out in #4665, running mocha with an argument such as `-r ts-node/register` fails because Node cannot resolve `node_modules/ts-node/register/index.js` as an ESM module. The returned error has a `code` of `'ERR_UNSUPPORTED_DIR_IMPORT'`, which should trigger the `require` fall-back logic.
    swansontec committed Jun 23, 2021
    Configuration menu
    Copy the full SHA
    b22921f View commit details
    Browse the repository at this point in the history