From cc0f81c040e912cff0c09e89327ef1655f96b67d Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Mon, 17 Jul 2023 22:32:23 +0200 Subject: [PATCH] fix(assets): Remove Node deps from index of assets (#7691) --- .changeset/shy-garlics-join.md | 5 +++++ packages/astro/src/assets/index.ts | 2 -- packages/astro/src/content/runtime-assets.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .changeset/shy-garlics-join.md diff --git a/.changeset/shy-garlics-join.md b/.changeset/shy-garlics-join.md new file mode 100644 index 000000000..a99d304bf --- /dev/null +++ b/.changeset/shy-garlics-join.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix not being able to build on Vercel Edge when `astro:assets` was enabled even when using a non-Node image service diff --git a/packages/astro/src/assets/index.ts b/packages/astro/src/assets/index.ts index 6b792fa97..9eeccf250 100644 --- a/packages/astro/src/assets/index.ts +++ b/packages/astro/src/assets/index.ts @@ -1,5 +1,3 @@ export { getConfiguredImageService, getImage } from './internal.js'; export { baseService, isLocalService } from './services/service.js'; export { type LocalImageProps, type RemoteImageProps } from './types.js'; -export { emitESMImage } from './utils/emitAsset.js'; -export { imageMetadata } from './utils/metadata.js'; diff --git a/packages/astro/src/content/runtime-assets.ts b/packages/astro/src/content/runtime-assets.ts index 122e00aa6..eaca83740 100644 --- a/packages/astro/src/content/runtime-assets.ts +++ b/packages/astro/src/content/runtime-assets.ts @@ -1,6 +1,6 @@ import type { PluginContext } from 'rollup'; import { z } from 'zod'; -import { emitESMImage } from '../assets/index.js'; +import { emitESMImage } from '../assets/utils/emitAsset.js'; export function createImage(pluginContext: PluginContext, entryFilePath: string) { return () => {