Skip to content

Commit

Permalink
Add fontsource packages to always be noExternal (#4073)
Browse files Browse the repository at this point in the history
* Add fontsource packages to always be noExternal

* Adds a changesetp
  • Loading branch information
matthewp authored Jul 27, 2022
1 parent 6fa6369 commit 13b4f8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-nails-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes use of @fontsource packages
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 @@ -34,6 +34,8 @@ const ALWAYS_NOEXTERNAL = new Set([
// Handle recommended nanostores. Only @nanostores/preact is required from our testing!
// Full explanation and related bug report: https://github.com/withastro/astro/pull/3667
'@nanostores/preact',
// fontsource packages are CSS that need to be processed
'@fontsource/*',
]);

function getSsrNoExternalDeps(projectRoot: URL): string[] {
Expand Down

0 comments on commit 13b4f8a

Please sign in to comment.