From 70263cf7481b11e42152c422acc6cfe90fe10ad2 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Thu, 21 Apr 2022 15:13:09 -0500 Subject: [PATCH] fix(preact): use updateConfig hook (#3166) --- .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(), - }; + }) }, }, };