diff options
author | 2022-04-21 15:13:09 -0500 | |
---|---|---|
committer | 2022-04-21 15:13:09 -0500 | |
commit | 70263cf7481b11e42152c422acc6cfe90fe10ad2 (patch) | |
tree | 4dc29c106b376cd389bb474c1561f6e320c8d5d6 | |
parent | f73d33cb18195e5f5999dbe0652f6bee94de795a (diff) | |
download | astro-70263cf7481b11e42152c422acc6cfe90fe10ad2.tar.gz astro-70263cf7481b11e42152c422acc6cfe90fe10ad2.tar.zst astro-70263cf7481b11e42152c422acc6cfe90fe10ad2.zip |
fix(preact): use updateConfig hook (#3166)
-rw-r--r-- | .changeset/thick-beds-flow.md | 5 | ||||
-rw-r--r-- | packages/integrations/preact/src/index.ts | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/.changeset/thick-beds-flow.md b/.changeset/thick-beds-flow.md new file mode 100644 index 000000000..69f16946b --- /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 0b0896210..11d4e9915 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(), - }; + }) }, }, }; |