diff --git a/.changeset/nine-experts-tan.md b/.changeset/nine-experts-tan.md new file mode 100644 index 000000000000..86c8523442ef --- /dev/null +++ b/.changeset/nine-experts-tan.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Throws a more helpful error when images are missing diff --git a/packages/astro/src/content/vite-plugin-content-assets.ts b/packages/astro/src/content/vite-plugin-content-assets.ts index f4b8ed98ec70..33084d6e392e 100644 --- a/packages/astro/src/content/vite-plugin-content-assets.ts +++ b/packages/astro/src/content/vite-plugin-content-assets.ts @@ -39,7 +39,7 @@ export function astroContentAssetPropagationPlugin({ ? fileURLToPath(new URL(importerParam, settings.config.root)) : importer; - const resolved = this.resolve(base, importerPath, { skipSelf: true, ...opts }); + const resolved = await this.resolve(base, importerPath, { skipSelf: true, ...opts }); if (!resolved) { throw new AstroError({ ...AstroErrorData.ImageNotFound,