Skip to content

Commit

Permalink
finalize alias support
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Oct 31, 2020
1 parent 51a11bb commit eda2e94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion snowpack/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,9 @@ function normalizeAlias(config: SnowpackConfig, cwd: string, createMountAlias: b
replacement.startsWith('/')
) {
delete cleanAlias[target];
cleanAlias[removeTrailingSlash(target)] = addTrailingSlash(path.resolve(cwd, replacement));
cleanAlias[target] = target.endsWith('/')
? addTrailingSlash(path.resolve(cwd, replacement))
: removeTrailingSlash(path.resolve(cwd, replacement));
}
}
return cleanAlias;
Expand Down

1 comment on commit eda2e94

@vercel
Copy link

@vercel vercel bot commented on eda2e94 Oct 31, 2020

Choose a reason for hiding this comment

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

Please sign in to comment.