From 43f6121452ba792359edfbff7a58e317e33075ec Mon Sep 17 00:00:00 2001 From: Linker Guo Date: Tue, 22 Nov 2016 19:06:14 +0800 Subject: [PATCH] Update bundle.js fix import issue of new version node-bsdiff --- local-cli/src/bundle.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/local-cli/src/bundle.js b/local-cli/src/bundle.js index b7dac3c..6768c4d 100644 --- a/local-cli/src/bundle.js +++ b/local-cli/src/bundle.js @@ -19,7 +19,8 @@ import crypto from 'crypto'; var diff; try { - diff = require('node-bsdiff'); + var bsdiff = require('node-bsdiff'); + diff = typeof bsdiff != 'function' ? bsdiff.diff : bsdiff; } catch(e) { diff = function() { console.warn('This function needs "node-bsdiff". Please run "npm i node-bsdiff -S" from your project directory first!');