From 58484c1441f18279ff96fb0c58ec69e2f441c9b7 Mon Sep 17 00:00:00 2001 From: Islam Date: Thu, 22 Sep 2022 16:53:52 +0200 Subject: [PATCH] feat: stop using __dirname if APP_ROOT_PATH is set - it is not necessary to use __dirname if APP_ROOT_PATH env var is used. - this should solve a problem when the package is used in an ESM app. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7fd5bde..9a45b63 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ 'use strict'; var lib = require('./lib/app-root-path.js'); -module.exports = lib(__dirname); \ No newline at end of file +module.exports = lib(process.env.APP_ROOT_PATH || __dirname);