rollup-plugin-node-resolve
This plugin used to be called rollup-plugin-npm
Locate modules using the Node resolution algorithm, for using third party modules in node_modules
Installation
npm install --save-dev rollup-plugin-node-resolve
Usage
// rollup.config.js; input: 'main.js' output: file: 'bundle.js' format: 'iife' name: 'MyModule' plugins: ;
Using with rollup-plugin-commonjs
Since most packages in your node_modules folder are probably legacy CommonJS rather than JavaScript modules, you may need to use rollup-plugin-commonjs:
// rollup.config.js;; input: 'main.js' output: file: 'bundle.js' format: 'iife' name: 'MyModule' plugins: ;
License
MIT