From 51240b70c6b94132c5ccf8c96701741e7b35fa70 Mon Sep 17 00:00:00 2001 From: Christopher Baker Date: Tue, 9 Jul 2019 18:32:41 -0700 Subject: [PATCH] Allow absolute file paths (#526) --- bin/serve.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/serve.js b/bin/serve.js index ed19ec8f..e1ad6c39 100755 --- a/bin/serve.js +++ b/bin/serve.js @@ -262,7 +262,7 @@ const loadConfig = async (cwd, entry, args) => { const config = {}; for (const file of files) { - const location = path.join(entry, file); + const location = path.resolve(entry, file); let content = null; try { @@ -313,7 +313,7 @@ const loadConfig = async (cwd, entry, args) => { if (entry) { const {public} = config; - config.public = path.relative(cwd, (public ? path.join(entry, public) : entry)); + config.public = path.relative(cwd, (public ? path.resolve(entry, public) : entry)); } if (Object.keys(config).length !== 0) {