Skip to content

Commit

Permalink
Fix astro:assets SSR error (#7034)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored May 8, 2023
1 parent 50bf66e commit c009970
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-chefs-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix `astro:assets` SSR error
2 changes: 2 additions & 0 deletions packages/astro/src/core/create-vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ const ONLY_DEV_EXTERNAL = [
'shiki',
// Imported by `@astrojs/prism` which exposes `<Prism/>` 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 */
Expand Down

0 comments on commit c009970

Please sign in to comment.