From ff68ba5e1ca00f06d1afd5fbf89acea3092bb660 Mon Sep 17 00:00:00 2001 From: Martin Trapp <94928215+martrapp@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:27:05 +0200 Subject: [PATCH] Fixes an issue with cssesc in dev mode when setting vite.ssr.noExternal: true (#12232) * Fixes an issue with cssesc in dev mode when setting vite.noExternal: true * Update dirty-bags-double.md --- .changeset/dirty-bags-double.md | 5 +++++ packages/astro/src/core/create-vite.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/dirty-bags-double.md diff --git a/.changeset/dirty-bags-double.md b/.changeset/dirty-bags-double.md new file mode 100644 index 000000000000..9c5f3e99302e --- /dev/null +++ b/.changeset/dirty-bags-double.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes an issue with cssesc in dev mode when setting `vite.ssr.noExternal: true` diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index f3174b5d325c..87574eda2d18 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -71,6 +71,8 @@ const ONLY_DEV_EXTERNAL = [ 'prismjs/components/index.js', // Imported by `astro/assets` -> `packages/astro/src/core/logger/core.ts` 'string-width', + // Imported by `astro:transitions` -> packages/astro/src/runtime/server/transition.ts + 'cssesc', ]; /** Return a base vite config as a common starting point for all Vite commands. */