Skip to content

Commit

Permalink
Fixes an issue with cssesc in dev mode when setting vite.ssr.noExtern…
Browse files Browse the repository at this point in the history
…al: true (#12232)

* Fixes an issue with cssesc in dev mode when setting vite.noExternal: true

* Update dirty-bags-double.md
  • Loading branch information
martrapp authored Oct 15, 2024
1 parent 6df5bba commit ff68ba5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-bags-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes an issue with cssesc in dev mode when setting `vite.ssr.noExternal: true`
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 @@ -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. */
Expand Down

0 comments on commit ff68ba5

Please sign in to comment.