jhurliman / node-rate-limiter

A generic rate limiter for node.js. Useful for API clients, web crawling, or other tasks that need to be throttled
MIT License
1.5k stars 132 forks source link

remove "type": "module" in `package.json` #75

Closed yaquawa closed 3 years ago

yaquawa commented 3 years ago

Currently, "type": "module" is not supported well in webpack 5 or ts-node, in package.json it already has "exports" and "module" fields set properly, so no need the "type": "module" field.

same issue is also happening with the just-performance

jhurliman commented 3 years ago

@yaquawa are you able to provide a small repro of the issue? Do you have a webpack setup where the build currently fails, but removing "type": "module" causes the build to succeed? I tested with the latest webpack while reorganizing the project, but I'm sure there are configurations that I missed which is why it would be helpful for me to see for future regression testing.

ali-sharif commented 3 years ago

This is the issue which causes ts-node to trip up when it encounters libraries with the "type": "module" field set

jhurliman commented 3 years ago

Fixed in https://github.com/jhurliman/node-rate-limiter/pull/79