From fcbdc3bb7187add215f79d4730da8e392a778326 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 2 Apr 2016 23:06:00 +0900 Subject: [PATCH] Fix #81 --- index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 0afa619..7eeec9d 100644 --- a/index.js +++ b/index.js @@ -147,8 +147,12 @@ module.exports = function (file, options) { chunks[i] = ''; } paths.forEach(function (p, i) { - var st = '\nrequire(' + p + ')' - chunks[node.range[1] + (i + 1)] = st + var st = '\nrequire(' + p + ');' + if (i === 0) { + chunks[node.range[1] + (i + 1)] = st + } else { + chunks[node.range[1] + (i)] = st + } }) }