Error: Could not resolve entry module (dist/esm/types/index.d.ts)
Issue is fixed when adding "rootDir": "src" in tsconfig.json file.
@vgarmes -
I included rootDir in tsconfig, but doesn't solve the warning that occurs in another project that uses lib.
Did you make any other changes?
@lwazevedo I can't remember now, but feel free to check the repo I started back then: https://github.com/vgarmes/ui-library
Change dist/esm/types/index.d.ts -> dist/esm/index.d.ts in rollup.config.js
Solution: https://stackoverflow.com/questions/73197460/error-could-not-resolve-entry-module-react-rollup/73784872#73784872
Adding "declarationMap": true in tsconfig.json solved this issue for me.
In my case, simply adding "rootDir": "src" in tsconfig.json has solved the issue.
in rollup.config.mjs, change plugins: [dts()] to plugins: [dts.default()]
Renaming my file from file.d.ts to file.ts worked