diff --git a/.changeset/green-chefs-build.md b/.changeset/green-chefs-build.md new file mode 100644 index 000000000000..d1669c826643 --- /dev/null +++ b/.changeset/green-chefs-build.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix `astro:assets` SSR error diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index ab7208b7d01c..89dec9d4b3af 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -58,6 +58,8 @@ const ONLY_DEV_EXTERNAL = [ 'shiki', // Imported by `@astrojs/prism` which exposes `` that is processed by Vite 'prismjs/components/index.js', + // Imported by `astro/assets` -> `packages/astro/src/core/logger/core.ts` + 'string-width', ]; /** Return a common starting point for all Vite actions */