fix: wrap this.resolve with try/catch
This commit is contained in:
parent
95229a4d0b
commit
693cd41a1c
1 changed files with 2 additions and 0 deletions
|
@ -81,8 +81,10 @@ export default function configAliasVitePlugin(astroConfig: { projectRoot?: URL;
|
||||||
name: '@astrojs/vite-plugin-config-alias',
|
name: '@astrojs/vite-plugin-config-alias',
|
||||||
enforce: 'pre',
|
enforce: 'pre',
|
||||||
async resolveId(sourceId: string, importer, options) {
|
async resolveId(sourceId: string, importer, options) {
|
||||||
|
try {
|
||||||
/** Resolved ID conditionally handled by any other resolver. (this gives priority to all other resolvers) */
|
/** 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 });
|
const resolvedId = await this.resolve(sourceId, importer, { skipSelf: true, ...options });
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
// if any other resolver handles the file, return that resolution
|
// if any other resolver handles the file, return that resolution
|
||||||
if (resolvedId) return resolvedId;
|
if (resolvedId) return resolvedId;
|
||||||
|
|
Loading…
Reference in a new issue