From 9c7db6ef25d19e10c58949495cbe11b836331daa Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Thu, 21 Apr 2022 11:49:55 -0500 Subject: [PATCH] fix(preact): use updateConfig hook --- .changeset/thick-beds-flow.md | 5 +++++ packages/integrations/preact/src/index.ts | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/thick-beds-flow.md diff --git a/.changeset/thick-beds-flow.md b/.changeset/thick-beds-flow.md new file mode 100644 index 000000000000..69f16946b0f1 --- /dev/null +++ b/.changeset/thick-beds-flow.md @@ -0,0 +1,5 @@ +--- +'@astrojs/preact': patch +--- + +Fix integration to use updateConfig rather than returning a partial config object diff --git a/packages/integrations/preact/src/index.ts b/packages/integrations/preact/src/index.ts index 0b0896210acb..11d4e991508d 100644 --- a/packages/integrations/preact/src/index.ts +++ b/packages/integrations/preact/src/index.ts @@ -39,11 +39,11 @@ export default function (): AstroIntegration { return { name: '@astrojs/preact', hooks: { - 'astro:config:setup': ({ addRenderer }) => { + 'astro:config:setup': ({ addRenderer, updateConfig }) => { addRenderer(getRenderer()); - return { + updateConfig({ vite: getViteConfiguration(), - }; + }) }, }, };