Skip to content

Commit

Permalink
Update packages/astro/src/vite-plugin-config-alias/index.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Nate Moore <[email protected]>
  • Loading branch information
bluwy and natemoo-re authored Jan 8, 2024
1 parent daad6f9 commit 9935886
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/astro/src/vite-plugin-config-alias/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ export default function configAliasVitePlugin({
if (alias.find.test(id)) {
const updatedId = id.replace(alias.find, alias.replacement);

// Vite may pass a "*"" for glob import paths resolving, which we can assume to apply
// the alias here directly
// Vite may pass an id with "*" when resolving glob import paths
// Returning early allows Vite to handle the final resolution
// See https://github.com/withastro/astro/issues/9258#issuecomment-1838806157
if (updatedId.includes('*')) {
return updatedId;
}
Expand Down

0 comments on commit 9935886

Please sign in to comment.