In ESM, other than in CJS, file endings are not automatically appended to import paths. The TypeScript compiler does not change this behavior; it emits the import statements exactly as written in the TypeScript source file. Imports without .js endings are only valid for either packages or named exports set in a package's package.json.
This PR fixes the few spots where currently imports without file names are used. This makes the package compatible with Node.js in ESM mode.
I did not yet change all test imports, as they are not included in the published bundle anyways.
In ESM, other than in CJS, file endings are not automatically appended to import paths. The TypeScript compiler does not change this behavior; it emits the import statements exactly as written in the TypeScript source file. Imports without
.js
endings are only valid for either packages or named exports set in a package'spackage.json
.This PR fixes the few spots where currently imports without file names are used. This makes the package compatible with Node.js in ESM mode.
I did not yet change all test imports, as they are not included in the published bundle anyways.
Fixes #91