From f04f2b0213e861df3622a9415ef566959dc836ea Mon Sep 17 00:00:00 2001 From: ICELI Date: Fri, 12 May 2017 11:24:00 +0800 Subject: [PATCH] fix: support windows 10 system * `entry` must `normalizeId` before `importeeId.replace` Closes #11 --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index d789813..94702d2 100644 --- a/src/index.js +++ b/src/index.js @@ -63,9 +63,9 @@ export default function alias(options = {}) { return null; } - const entry = options[toReplace]; + const entryId = normalizeId(options[toReplace]); - const updatedId = importeeId.replace(toReplace, entry); + const updatedId = importeeId.replace(toReplace, entryId); if (isFilePath(updatedId)) { const directory = path.dirname(importerId);