From 5c67f27db43a64f74131478818f70e5b3c684020 Mon Sep 17 00:00:00 2001 From: rdfriedl Date: Thu, 13 Apr 2017 19:50:36 -0500 Subject: [PATCH] fixed bug with resolve and absolute aliases on windows --- package.json | 4 +++- src/index.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 07f2df7..b5c0ab3 100644 --- a/package.json +++ b/package.json @@ -46,5 +46,7 @@ "rollup-babel-lib-bundler": "^2.2.4", "slash": "^1.0.0" }, - "dependencies": {} + "dependencies": { + "slash": "^1.0.0" + } } diff --git a/src/index.js b/src/index.js index d789813..de546a0 100644 --- a/src/index.js +++ b/src/index.js @@ -65,7 +65,7 @@ export default function alias(options = {}) { const entry = options[toReplace]; - const updatedId = importeeId.replace(toReplace, entry); + const updatedId = normalizeId(importeeId.replace(toReplace, entry)); if (isFilePath(updatedId)) { const directory = path.dirname(importerId);