From 13b4f8ad887d0d4e8efbf9f74185432f9cdf264e Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Wed, 27 Jul 2022 15:48:21 -0400 Subject: [PATCH] Add fontsource packages to always be noExternal (#4073) * Add fontsource packages to always be noExternal * Adds a changesetp --- .changeset/clever-nails-pump.md | 5 +++++ packages/astro/src/core/create-vite.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/clever-nails-pump.md diff --git a/.changeset/clever-nails-pump.md b/.changeset/clever-nails-pump.md new file mode 100644 index 000000000000..e363c78f5524 --- /dev/null +++ b/.changeset/clever-nails-pump.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes use of @fontsource packages diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index 0855112ea600..7b3a8070f72b 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -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[] {