We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 325505d + d1eeeeb commit 697be50Copy full SHA for 697be50
mod.ts
@@ -47,8 +47,10 @@ async function getAbsPath(
47
return path.resolve(dirname, file);
48
}
49
50
- for (const [_alias, aliasPath] of Object.entries(aliases)) {
51
- const alias = _alias.endsWith("/") ? _alias : `${_alias}/`;
+ for (const [_alias, _aliasPath] of Object.entries(aliases)) {
+ const addSlash = (str: string) => (str.endsWith("/") ? str : `${str}/`);
52
+ const alias = addSlash(_alias);
53
+ const aliasPath = addSlash(_aliasPath);
54
if (file.startsWith(alias)) {
55
const s = new MagicString(file);
56
s.overwrite(0, alias.length, aliasPath);
0 commit comments