You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since @rollup/pluginutils already provides the type definition file, it should be able to be compiled successfully by tsc.
Actual Behavior
However, when it is introduced as an esm package, the following compilation error occurs:
error TS7016: Could not find a declaration file for module '@rollup/pluginutils'. '/Users/ding/Projects/q/node_modules/@rollup/pluginutils/dist/es/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/rollup__pluginutils` if it exists or add a new declaration (.d.ts) file containing `declare module '@rollup/pluginutils';`
I was also just hit by this yesterday. Aside from pluginutils are node-resolve and commonjs plugins also affected. Seems like this is the correct way of specifying it:
But maybe exports can be removed entirely, since main, module, and types are already specified.
Also note that even with this fixed, the default exports of the plugins are broken causing e.g. commonjs from import commonjs from "@rollup/plugin-commonjs"; to have an incorrect type. Maybe related to this or this. Using import { default as commonjs } from "@rollup/plugin-commonjs"; instead works.
Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it. ⓘ
Expected Behavior
Since @rollup/pluginutils already provides the type definition file, it should be able to be compiled successfully by tsc.
Actual Behavior
However, when it is introduced as an esm package, the following compilation error occurs:
Additional Information
add
exports.types
topackage.json
could fix it.The text was updated successfully, but these errors were encountered: