You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use custom Axios instance in ESM-only package (i.e. that uses type: "module" in package.json and "module": "node16", "moduleResolution": "node16" in tsconfig.json).
What happens?
Generated code that imports the custom Axios is:
import {customInstance} from './customInstance';
What were you expecting to happen?
Generated code that imports the custom Axios should be:
import {customInstance} from './customInstance.js';
Any logs, error output, etc?
TypeScript errors: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './customInstance.js'? typescript(2835)
What versions are you using?
Package Version:6.25.0
The text was updated successfully, but these errors were encountered:
Maybe an option like useExtensionsInImportPaths: true would suffice? Anyway, extensions are mandatory when using ES modules, so it's not just TypeScript-related bug.
What are the steps to reproduce this issue?
Use custom Axios instance in ESM-only package (i.e. that uses
type: "module"
in package.json and"module": "node16", "moduleResolution": "node16"
intsconfig.json
).What happens?
Generated code that imports the custom Axios is:
What were you expecting to happen?
Generated code that imports the custom Axios should be:
Any logs, error output, etc?
TypeScript errors:
Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './customInstance.js'? typescript(2835)
What versions are you using?
Package Version:
6.25.0
The text was updated successfully, but these errors were encountered: