From 3d77fe50aab51c3127787631250d5e011a9c23dc Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 22 Apr 2016 11:28:56 -0400 Subject: [PATCH] Fix for avoid build issue for browser verify if the code is to build for nodeJs or for the browser. If the library is built and minified for the browser, the NodeJS code in index.js will not be added because module.exports cannot interpreted by the browser. --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 635af81..1d4a13d 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,8 @@ +if (typeof module === 'object' && module.exports) { module.exports = require('./js/load-image') require('./js/load-image-exif') require('./js/load-image-exif-map') require('./js/load-image-meta') require('./js/load-image-orientation') +}