From af80b7987b7e2c81b96570ee1308af360aa44f0c Mon Sep 17 00:00:00 2001 From: silkentrance Date: Thu, 1 Jan 2015 10:45:30 -0500 Subject: [PATCH] Fix: Ensure load() resolves the filepath before requiring (fixes #7) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index caa1a01..586d1fe 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ exports.registerFor = function (filepath, cwd) { exports.load = function (filepath) { exports.registerFor(filepath); - return require(filepath); + return require(path.resolve(filepath)); }; exports.interpret = interpret;