https://github.com/timonvs/tsimp-imports
https://github.com/timonvs/tsimp-imports
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/timonvs/tsimp-imports
- Owner: TimonVS
- Created: 2024-01-15T14:22:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-15T15:24:43.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T11:49:04.613Z (10 months ago)
- Language: TypeScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tsimp imports bug reproduction
Use Node.js v18.18.2, ts-node breaks with v18.19.0.
## tsimp
Relative imports work fine:
```sh
node --conditions=development --loader=tsimp/loader src/relative-import.ts
```
[Subpath imports](https://nodejs.org/api/packages.html#subpath-imports) using the `"imports"` field in `package.json` fails with `Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/timon.vanspronsen/Code/tsimp-imports/src/utils/math.js'`.
```sh
node --conditions=development --loader=tsimp/loader src/imports.ts
```
## ts-node
Comparison with ts-node, the below command works, but only after an initial build with `npx tsc` (it does use the development version of `math.ts` afterwards):
```sh
node --conditions=development --loader=ts-node/esm src/imports.ts
```