0.1.0 • Published 5 years ago

rollup-plugin-node-modules v0.1.0

Weekly downloads
62
License
ISC
Repository
github
Last release
5 years ago

rollup-plugin-node-modules

npm.io npm.io

rollup-plugin-node-modules helps you bundle Node.js CommonJS code with Rollup.

Features

rollup-plugin-node-modules makes innovative changes to how Rollup handles JavaScript code that does not adhere to ECMAScript modules system.

  • All Module System Concerned Features in One Place.
  • Inclusive and Flexible Module Resolution.
  • Automatic and Error-free CommonJS Code Transformation.
  • Highly Customizable with Various Options.

Usage

To add the plugin to your project:

# Using npm
npm install --D rollup-plugin-node-modules

# Using Yarn
yarn add -D rollup-plugin-node-modules

For simple projects, use the following template in your rollup.config.js:

import nodeModules from 'rollup-plugin-node-modules'

export default {
  input: './index.js',

  plugins: [
    nodeModules({
      /* Options. */
    }),
    /* Other plugins. */
  ]
}

The plugin allows you to specify a wide range of options. Refer to API documentation for the list of options.

Contributing

The project welcomes all kinds of contributions. See Contributing Guidelines for details on how to build and test the project.

Code in this project is distributed under the ISC License.