From a597e1c517923a46d112913b9af6c6f48f3f874b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 Dec 2021 19:12:06 +0000 Subject: [PATCH] chore(lint): Prettier fix --- packages/astro/src/vite-plugin-config-alias/index.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/astro/src/vite-plugin-config-alias/index.ts b/packages/astro/src/vite-plugin-config-alias/index.ts index 6a6d6de8d..6d2d0a008 100644 --- a/packages/astro/src/vite-plugin-config-alias/index.ts +++ b/packages/astro/src/vite-plugin-config-alias/index.ts @@ -82,8 +82,8 @@ export default function configAliasVitePlugin(astroConfig: { projectRoot?: URL; 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 }); + /** 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 @@ -95,8 +95,10 @@ export default function configAliasVitePlugin(astroConfig: { projectRoot?: URL; /** Processed Source ID with our alias applied. */ const aliasedSourceId = sourceId.replace(alias.find, alias.replacement); - /** Resolved ID conditionally handled by any other resolver. (this also gives priority to all other resolvers) */ - const resolvedAliasedId = await this.resolve(aliasedSourceId, importer, { skipSelf: true, ...options }); + try { + /** Resolved ID conditionally handled by any other resolver. (this also gives priority to all other resolvers) */ + const resolvedAliasedId = await this.resolve(aliasedSourceId, importer, { skipSelf: true, ...options }); + } catch (e) {} // if the existing resolvers find the file, return that resolution if (resolvedAliasedId) return resolvedAliasedId;