Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ignorify

alexstrat20.1.1

Browserify middleware that allows to specify ignore rules in source code

readme

node-ignorify

Browserify middleware that allows to specify ignore rules in source code

Installation

$ npm install ignorify

Usage

Just throw the ignorify tag before the require statement you want to be ignored by browserfy.

//@browserify-ignore
var foo = require('./dontrequireit');

Then, during the bundling specify the ignorify middleware :

var browserify = require('browserify');
var ignorify = require('ignorify');

var bundle = browserify();
bundle.register(ignorify);
bundle.addEntry('./index.js');
bundle.bundle();

Or :

$ browserify entry.js -p 'ignorify' -o browserify.js

Test

$ npm test