use-debounce
use-debounce copied to clipboard
`MODULE_TYPELESS_PACKAGE_JSON` warning due to missing `"type": "module"`
When using the package, Node.js emits the following warning:
[MODULE_TYPELESS_PACKAGE_JSON] Warning: file:///[...]/node_modules/use-debounce/dist/index.module.js parsed as an ES module because module syntax was detected; to avoid the performance penalty of syntax detection, add "type": "module" to /[...]/node_modules/use-debounce/package.json
A "type": "module" declaration was added to package.json in 5a68494, but was subsequently removed in 3556a91.
It should be added back to avoid this warning.
Versions
use-debounce: 10.0.4
node: 22.8.0
JFYI: for me it leads now to "Cannot use import statement outside a module" with latest react-router and vite
For anyone else who might come here using noExternal helped me
It disappeared for me completely using Node.js version 22.12.