Describe the bug#
When having moduleResolution set to node16 typescript complains about missing named exports when trying to import e.g. createRouter via import { createRouter } from '@tanstack/react-router'. When I navigate to the source of @tanstack/react-router I end up in node_modules/@tanstack/react-router/dist/esm/index.d.ts every export * from './*' statement is flagged as an error typescript: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './awaited.js'? [2835]. When I look into the js file (node_modules/@tanstack/react-router/dist/esm/index.js) everything looks fine and all file extensions are present, so it works fine in nodejs but still typescript complains because the .d.ts file is different as the .js file.
Your Example Website or App#
https://stackblitz.com/edit/github-yk78pg
Steps to Reproduce the Bug or Issue#
- set
moduleResolution set to node16
- import something from '@tanstack/react-router'
- run typescript
Expected behavior#
I would expect the file extensions in the .d.ts file to be present.
Screenshots or Videos#
No response
Platform#
- OS: macos
- Browser: n/a
- Version: 1.12.12
Additional context#
No response
can you set
moduleResolutiontoBundlerinstead?