https://github.com/zoubin/dedupify
Replace the default dedupe transform for browserify
https://github.com/zoubin/dedupify
Last synced: 13 days ago
JSON representation
Replace the default dedupe transform for browserify
- Host: GitHub
- URL: https://github.com/zoubin/dedupify
- Owner: zoubin
- License: mit
- Created: 2016-03-02T11:01:44.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-03T02:25:32.000Z (over 10 years ago)
- Last Synced: 2025-09-15T22:41:50.627Z (9 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dedupify
[](https://www.npmjs.org/package/dedupify)
[](https://travis-ci.org/zoubin/dedupify)

Replace the default dedupe transform for browserify,
to fix [substack/factor-bundle#51](https://github.com/substack/factor-bundle/issues/51).
## Usage
```js
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.