From 8b350613c5d00a39637bbc16a60c9033b52beb1a Mon Sep 17 00:00:00 2001 From: Kevin Thompson Date: Wed, 21 Oct 2015 14:38:17 -0700 Subject: [PATCH] Update cacheDependency to use the existing object rather than copy it. This should close gobblejs/gobble-browserify#6 --- index.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 87ada06..5681ece 100644 --- a/index.js +++ b/index.js @@ -30,12 +30,8 @@ function concat ( stream, callback ) { }); } -function cacheDependency ( cache, originalDep, inputdir ) { - var dep = {}; - Object.keys( originalDep ).forEach( function ( key ) { - dep[ key ] = originalDep[ key ]; - }); - +function cacheDependency ( cache, dep, inputdir ) { + dep.basedir && ( dep.basedir = dep.basedir.replace( inputdir, '@' ) ); dep.id = dep.id.replace( inputdir, '@' ); dep.file = dep.file.replace( inputdir, '@' );