diff --git a/bin/serve.js b/bin/serve.js index 45e583f3..64b32584 100755 --- a/bin/serve.js +++ b/bin/serve.js @@ -260,7 +260,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 { @@ -311,7 +311,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) {