rollup-plugin-node-resolve-jail

3.0.0 • Public • Published

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

Package Sidebar

Install

npm i rollup-plugin-node-resolve-jail

Weekly Downloads

6

Version

3.0.0

License

MIT

Last publish

Collaborators

  • spy-seth