From 47be52c97a052c5b087b4697ef823611f9ec6c00 Mon Sep 17 00:00:00 2001 From: bluwy Date: Thu, 19 Jan 2023 17:36:44 +0800 Subject: [PATCH] Fix types --- packages/integrations/svelte/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/integrations/svelte/src/index.ts b/packages/integrations/svelte/src/index.ts index 461a0f4d3db1..7daa9bec506b 100644 --- a/packages/integrations/svelte/src/index.ts +++ b/packages/integrations/svelte/src/index.ts @@ -29,7 +29,7 @@ type ViteConfigurationArgs = { root: URL; }; -async function getViteConfiguration({ options, isDev, root }: ViteConfigurationArgs): UserConfig { +async function getViteConfiguration({ options, isDev, root }: ViteConfigurationArgs): Promise { const defaultOptions: Partial = { emitCss: true, compilerOptions: { dev: isDev, hydratable: true }, @@ -77,10 +77,10 @@ export default function (options?: Options | OptionsCallback): AstroIntegration name: '@astrojs/svelte', hooks: { // Anything that gets returned here is merged into Astro Config - 'astro:config:setup': ({ command, updateConfig, addRenderer, config }) => { + 'astro:config:setup': async ({ command, updateConfig, addRenderer, config }) => { addRenderer(getRenderer()); updateConfig({ - vite: getViteConfiguration({ + vite: await getViteConfiguration({ options, isDev: command === 'dev', root: config.root,