Skip to content
This repository was archived by the owner on Jul 19, 2022. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ module.exports = function (config = {}) {
log.all(id, 'looking in aliases')
for (let [aliasName, aliasPath] of Object.entries(alias)) {
log.all(id, 'looking in aliases', aliasName)
if (id.startsWith(aliasName + path.sep)) {
if (id.startsWith(aliasName + '/' || aliasName + '\\')) {
Copy link
Owner

@n1kk n1kk May 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you meant if (id.startsWith(aliasName + '/') || id.startsWith(aliasName + '\\')) { ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry yes you're right!

log.match(id, 'matched alias', aliasName, aliasPath)
let importPath = path.resolve(path.join(aliasPath, id.substring(aliasName.length)))
let filepath = await findFile(importPath)
Expand Down