anchorme.js
anchorme.js copied to clipboard
Cannot import correctly under TypeScript Node 16 module resolution
🐛 Bug Report
Under TypeScript Node 16 module resolution (has type: module in the package.json and moduleResolution: Node16 in tsconfig.json), this package cannot be imported correctly.
To Reproduce
import anchorme from 'anchorme'
anchorme.list("")
package.json
{ "type": "module" }
tsconfig.json
{
"compilerOptions": {
"moduleResolution": "Node16"
}
}
Observed behavior
Cannot be imported.
Expected behavior
Imported correctly.
Environment
- 3.0.4
Please check the latest version 3.0.7
@alexcorvi thanks for your work! But I'm afraid it's still incorrect:
import anchorme from 'anchorme'
console.log(anchorme) // This expression is not callable.
console.log(anchorme.list) // TypeScript error, but works with webpack
console.log(anchorme.default.list) // TypeScript no error, but crashes after webpack