Closed
Description
In v2.0.0, it seems that the change from:
const extensions = Object.keys(require.extensions).concat(
'.ts',
'.tsx',
'.d.ts',
);
to:
const extensions = ['.ts', '.tsx', '.d.ts'].concat(
// eslint-disable-next-line node/no-deprecated-api
Object.keys(require.extensions),
'.jsx',
)
...means that if a node module is imported and contains both .js
and .d.ts
files, the .d.ts
file is now resolved instead of the .js
one. This results in import/default
errors, e.g.:
import React from 'react';
error: No default export found in module (import/default)
Maybe I'm missing something obvious?