We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
vite
cssesc
vite-node
1 parent c432ff3 commit ec0b024Copy full SHA for ec0b024
.changeset/tame-hornets-turn.md
@@ -0,0 +1,5 @@
1
+---
2
+'@vanilla-extract/integration': patch
3
4
+
5
+Fixes an error that sometimes occurred when loading a page via the astro dev server
packages/integration/src/compiler.ts
@@ -110,6 +110,11 @@ const createViteServer = async ({
110
},
111
ssr: {
112
noExternal: true,
113
+ // `cssesc` is CJS-only, so we need to mark it as external as Vite's transform pipeline
114
+ // can't handle CJS during dev-time.
115
+ // See https://github.com/withastro/astro/blob/0879cc2ce7e15a2e7330c68d6667d9a2edea52ab/packages/astro/src/core/create-vite.ts#L86
116
+ // and https://github.com/withastro/astro/issues/11395
117
+ external: ['cssesc'],
118
119
plugins: [
120
{
0 commit comments