doesdev / rollup-plugin-analyzer

Mad metrics for your rollup bundles, know all the things

Home Page:http://rollup-plugin-analyzer.doesdev.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error TS2307: Cannot find module 'rollup' or its corresponding type declarations.

StreetStrider opened this issue · comments

I'm using this plugin and TS.
This line is problematic:

import { Plugin } from "rollup";

../node_modules/.pnpm/rollup-plugin-analyzer@4.0.0/node_modules/rollup-plugin-analyzer/index.d.ts:1:24 - error TS2307: Cannot find module 'rollup' or its corresponding type declarations.

1 import { Plugin } from "rollup";

The problem might be invisible to devs since rollup is in dev deps.
I think Rollup must be declared as optional peer. It is in accordance with how other plugins declare it: https://github.com/rollup/plugins/blob/5ec2abe0325ed6b23bca26a5455d2a3b137e9e29/packages/node-resolve/package.json#L55-L62