From ad4da1d193c616db84aae2a9b1c57fb4b19a5513 Mon Sep 17 00:00:00 2001 From: Christopher Karper Date: Sun, 15 Feb 2015 00:33:28 -0500 Subject: [PATCH] Support .json extensions in require() resolution Embarrassingly simple fix. Added .json to the list of extensions to search when a require with no extension is found. This resolves #57 --- lib/bundle.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bundle.js b/lib/bundle.js index 21e4f34..37c05be 100644 --- a/lib/bundle.js +++ b/lib/bundle.js @@ -62,7 +62,8 @@ function bundle (input, complete) { filter: function (id) { if (id == 'nexeres') { return false; } //treat our new moudle as a builtin module return !~builtins.indexOf(id); - } + }, + extensions: ['.js', '.json' ] }); md.pipe(through(function (chunk) { deps.push(chunk);