Nostalgic Primordial Monster

    @zeekay/rollup-plugin-node-resolve

    0.2.13 • Public • Published

    @zeekay/rollup-plugin-node-resolve

    NPM version Build Status Coverage Status Dependency Status Gitter chat

    Locate modules using the Node resolution algorithm, for using third party modules in node_modules. Differs in the following ways from rollup-plugin-node-resolve:

    • Automatically degrades from 'module' -> 'jsnext:main' -> 'main' -> 'index.js'
    • Correctly resolves symlinked packages.
    • Prefers entry-module basedir as basedir for resolution (ideal for bundled apps, prevents duplication of shared modules).

    Originally developed as part of Handroll.

    Install

    $ npm install @zeekay/rollup-plugin-node-resolve --save-dev

    Usage

    Add the following code to your project's rollup.config.js:

    import resolve  from '@zeekay/rollup-plugin-node-resolve';
    import commonjs from 'rollup-plugin-commonjs';
    
    export default {
      entry: 'index.js',
      plugins: [
        resolve({
          // defaults
          basedir:        path.dirname('index.js'),
          browser:        false,
          extensions:     ['.js', '.json', '.coffee', '.pug', '.styl'],
          preferBuiltins: true,
          skip:           []
        }),
        commonjs()
      ]
    };

    License

    MIT

    Install

    npm i @zeekay/rollup-plugin-node-resolve

    DownloadsWeekly Downloads

    3

    Version

    0.2.13

    License

    MIT

    Unpacked Size

    52.1 kB

    Total Files

    11

    Last publish

    Collaborators

    • zeekay