diff --git a/packages/astro/src/vite-plugin-config-alias/index.ts b/packages/astro/src/vite-plugin-config-alias/index.ts index 15ae0bffc..6a6d6de8d 100644 --- a/packages/astro/src/vite-plugin-config-alias/index.ts +++ b/packages/astro/src/vite-plugin-config-alias/index.ts @@ -81,8 +81,10 @@ export default function configAliasVitePlugin(astroConfig: { projectRoot?: URL; name: '@astrojs/vite-plugin-config-alias', enforce: 'pre', async resolveId(sourceId: string, importer, options) { + try { /** Resolved ID conditionally handled by any other resolver. (this gives priority to all other resolvers) */ const resolvedId = await this.resolve(sourceId, importer, { skipSelf: true, ...options }); + } catch (e) {} // if any other resolver handles the file, return that resolution if (resolvedId) return resolvedId;