rollup-plugin-commonjs is a Rollup plugin that converts CommonJS modules to ES modules, allowing you to bundle them into your Rollup projects. This is crucial for incorporating older npm packages reliant on CommonJS syntax. The plugin analyzes your code and automatically transforms require statements and module.exports assignments into their ES module equivalents, ensuring compatibility and enabling efficient tree-shaking for smaller bundle sizes. Configurable options offer fine-grained control over the transformation process.