unjs / unplugin

Unified plugin system for Vite, Rollup, Webpack, esbuild, Rolldown, and more

Home Page:https://unplugin.unjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not expose types when using Node16 moduleResolution

IanVS opened this issue · comments

Hi, I have a typescript package that is using "moduleResolution": "Node16", and unfortunately I get the error:

Could not find a declaration file for module 'unplugin'. '/Users/ianvs/code/storybook/storybook/code/node_modules/unplugin/dist/index.mjs' implicitly has an 'any' type.
  Try `npm i --save-dev @types/unplugin` if it exists or add a new declaration (.d.ts) file containing `declare module 'unplugin';`

If I edit the package.json in node_modules for unplugin, to add types to the exports map, it's fine, and the error disappears.