A Rollup plugin that resolves module imports using the Bower resolution algorithm, allowing Rollup to bundle Bower components. Version 3.1.0 is the latest stable release, supporting Rollup v1 through v4 and Node >=14. Unlike npm-centric plugins, this plugin is specifically designed for projects that still rely on Bower for dependency management. It offers options for offline mode, custom working directories, and overrides for main entry points. The plugin is in maintenance mode as the Bower ecosystem has largely been superseded by npm/Yarn.
npm install rollup-plugin-bower-resolveVerified import paths — ran on the pinned version, not inferred.
Shows a complete Rollup build using the plugin with Bower resolution and CommonJS support.
Update Node to >=14.0.0 and use import syntax instead of require.
Set module: true and jsnext: false to future-proof.
Set offline: false to fetch from remote, or ensure bower install has been run.
Upgrade Rollup to >=2.0.0 and Node to >=10.0.0.
Upgrade Rollup to >=1.0.0 and Node to >=6.0.0.
Switch to import syntax: import bowerResolve from 'rollup-plugin-bower-resolve'
Use const bowerResolve = require('rollup-plugin-bower-resolve').default;