dividab / tsconfig-paths

Load node modules according to tsconfig paths, in run-time or via API.
MIT License
1.8k stars 100 forks source link

Support package.json main field omit file extenstion #254

Open pilaoda opened 11 months ago

pilaoda commented 11 months ago
{
  "name": "my-package",
  "main": "dist/index",
}

The main field should resolve to dist/index.js. https://github.com/dividab/tsconfig-paths/blob/b4eb77bd1a49096f0fa1076e65a8182819b1dc2c/src/match-path-sync.ts#L87 This function should consider all supported file extensions rather than path.join only.