Skip to content

Instantly share code, notes, and snippets.

@vvo
Last active October 8, 2015 20:58
Show Gist options
  • Save vvo/5a2ec06c2752c6b35e48 to your computer and use it in GitHub Desktop.
Save vvo/5a2ec06c2752c6b35e48 to your computer and use it in GitHub Desktop.
Pinning npm dependencies resulting in duplicated code in a build
var woofmark = require('woofmark');
var dragula = require('dragula');
{
"name": "dep-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"dragula": "^3.5.1",
"woofmark": "^4.0.2"
}
}
> browserify index.js | grep 'function addEventEasy (el, type, fn, capturing) {'
function addEventEasy (el, type, fn, capturing) {
function addEventEasy (el, type, fn, capturing) {
# addEventEasy comes from crossvent which is a dependency of both dragular and woofmark
# but pinned at different patch versions, which result in full crossvent module duplication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment