3.0.0 • Published 8 years ago

rollup-plugin-node-resolve-jail v3.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

rollup-plugin-node-resolve-jail

This plugin is a fork of the rollup-plugin-node-resolve plugin. It add a jail/chroot like feature.

Locate modules using the Node resolution algorithm, for using third party modules in node_modules. This fork allow to restrain the lookup into a parent directory.

Installation

npm install --save-dev rollup-plugin-node-resolve-jail

Usage

import { rollup } from 'rollup';
import nodeResolveJail from 'rollup-plugin-node-resolve-jail';

rollup({
  entry: 'main.js',
  plugins: [
    nodeResolveJail({
      // See `rollup-plugin-node-resolve` plugin documentation for the options
      // detail.

      // Lock the module search in this path (like a chroot). Module defined
      // outside this path will be mark has external.
      jail: '/my/jail/path' // Default: '/'

    })
  ]
}).then( bundle => bundle.write({ dest: 'bundle.js', format: 'iife' }) );

License

MIT