Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
fix(Loader): Fix for Windows relative path parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Yimura committed Nov 28, 2021
1 parent 9a924ce commit 1aec053
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions util/loader.js
@@ -1,7 +1,8 @@
import { resolve as resolvePath } from 'path'
import { resolve as resolvePath, join as joinPath } from 'path'

export async function resolve(specifier, context, defaultResolver) {
specifier = specifier.replace(/^@\//, resolvePath('.') + '/');
if (specifier.startsWith('@/'))
specifier = joinPath('file://', resolvePath('.'), specifier.replace(/^@\//, ''));

return defaultResolver(specifier, context);
}

0 comments on commit 1aec053

Please sign in to comment.