fix(preact): use updateConfig hook (#3166)

This commit is contained in:
Nate Moore 2022-04-21 15:13:09 -05:00 committed by GitHub
parent f73d33cb18
commit 70263cf748
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/preact': patch
---
Fix integration to use updateConfig rather than returning a partial config object

View file

@ -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(),
};
})
},
},
};