0.1.0 • Published 8 years ago

dedupify v0.1.0

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

dedupify

version status node

Replace the default dedupe transform for browserify, to fix substack/factor-bundle#51.

Usage

const browserify = require('browserify')
const dedupify = require('dedupify')

var b = browserify(opts)
b.plugin(dedupify)
b.on('dedupify.deduped', (o) => {
  console.warn('Duplicates of modules found!', o.file, o.dup)
})

NOTE This plugin disables the dedupe transform, so you probably should warn the developer to reinstall dependencies manually.

Events

b.on('dedupify.deduped', o)

o.file and o.dup are file paths to the two modules which have the same contents.