Closed zkulbeda closed 7 months ago
Hi! I'm really liking this library! Thank you for your work. I use moduleResolution of node16 in my project, and can't import it without errors.
Then I edit package.json in node_modules
package.json
node_modules
... "umd:main": "./dist/prod/index.umd.js", "exports": { "require": "./dist/prod/index.cjs", "default": "./dist/prod/index.modern.js", + "types": "./src/index.ts" }, "types": "./dist/types/index.d.ts", ...
But the source files is containing imports without .js extension, so there's other error
And last thing I tried is providing url to .d.ts file in exports:
exports
... "umd:main": "./dist/prod/index.umd.js", "exports": { "require": "./dist/prod/index.cjs", "default": "./dist/prod/index.modern.js", - "types": "./src/index.ts" + "types": "./dist/types/index.d.ts" }, "types": "./dist/types/index.d.ts", ...
But it also didn't work.
Without extensions it just doesn't reexport types in index.d.ts
index.d.ts
I think the best solution for this problem is providing extensions for import paths and providing type's path to index.d.ts file in exports. What do you think?
can you create an example repository?
Yes, see https://github.com/zkulbeda/pumpit_ts
@zkulbeda this is now fixed closed via: https://github.com/ivandotv/pumpit/pull/64
Hi! I'm really liking this library! Thank you for your work. I use moduleResolution of node16 in my project, and can't import it without errors.
Then I edit
package.json
innode_modules
But the source files is containing imports without .js extension, so there's other error
And last thing I tried is providing url to .d.ts file in
exports
:But it also didn't work.
Without extensions it just doesn't reexport types in
index.d.ts
I think the best solution for this problem is providing extensions for import paths and providing type's path to index.d.ts file in
exports
. What do you think?