diff --git a/packages/astro/src/core/build/plugins/plugin-content.ts b/packages/astro/src/core/build/plugins/plugin-content.ts index 1698eb2a0c..3f0da0d5f7 100644 --- a/packages/astro/src/core/build/plugins/plugin-content.ts +++ b/packages/astro/src/core/build/plugins/plugin-content.ts @@ -255,7 +255,7 @@ function vitePluginContent( ...oldManifest.clientEntries, ...internals.discoveredHydratedComponents.keys(), ...internals.discoveredClientOnlyComponents.keys(), - ...internals.discoveredScripts + ...internals.discoveredScripts, ]); // Likewise, these are server modules that might not be referenced // once the cached items are excluded from the build process diff --git a/packages/astro/test/experimental-content-collections-render.test.js b/packages/astro/test/experimental-content-collections-render.test.js index e5d152f410..0de3cbc34a 100644 --- a/packages/astro/test/experimental-content-collections-render.test.js +++ b/packages/astro/test/experimental-content-collections-render.test.js @@ -146,7 +146,9 @@ if (!isWindows) { // Includes hoisted script assert.notEqual( - [...allScripts].find((script) => $(script).attr('src')?.includes('/_astro/WithScripts')), + [...allScripts].find((script) => + $(script).attr('src')?.includes('/_astro/WithScripts') + ), undefined, 'hoisted script missing from head.' );