fix(cli-serve): fix path separator on windows (#303)

This commit is contained in:
Miralem Drek
2020-02-10 15:41:35 +01:00
committed by GitHub
parent a2eeb9a7df
commit a36a7f1437

View File

@@ -62,7 +62,7 @@ const initiateWatch = async ({ snPath, snName, host }) => {
const sources = Object.keys(cache);
for (let i = 0; i < sources.length; i++) {
const p = cache[sources[i]];
const filename = p.split('/').reverse()[0];
const filename = p.split(path.sep).reverse()[0];
if (`${filename}.map` === name) {
file = path.resolve(path.dirname(p), name);
break;