'How to remove console.log of dependency modules using Rollup, Except my codes

I want to remove console.log of dependency modules (node_modules).
So I tried terser({ compress: { drop_console: true } }).

But, It drops even console.log of my codes.
I want to remove console.log of only node_modules. (Except my codes)

Is there way to do it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source