diff options
Diffstat (limited to 'packages/integrations/preact/src')
-rw-r--r-- | packages/integrations/preact/src/index.ts | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/packages/integrations/preact/src/index.ts b/packages/integrations/preact/src/index.ts index 88c603751..3a7a99856 100644 --- a/packages/integrations/preact/src/index.ts +++ b/packages/integrations/preact/src/index.ts @@ -52,17 +52,9 @@ function getCompatRenderer(development: boolean): AstroRenderer { function getViteConfiguration(compat?: boolean): ViteUserConfig { const viteConfig: ViteUserConfig = { optimizeDeps: { - include: [ - '@astrojs/preact/client.js', - 'preact', - 'preact/jsx-runtime', - 'preact-render-to-string', - ], + include: ['@astrojs/preact/client.js', 'preact', 'preact/jsx-runtime'], exclude: ['@astrojs/preact/server.js'], }, - ssr: { - external: ['preact-render-to-string'], - }, }; if (compat) { @@ -81,12 +73,9 @@ function getViteConfiguration(compat?: boolean): ViteUserConfig { dedupe: ['preact/compat', 'preact'], }; // noExternal React entrypoints to be bundled, resolved, and aliased by Vite - viteConfig.ssr!.noExternal = [ - 'react', - 'react-dom', - 'react-dom/test-utils', - 'react/jsx-runtime', - ]; + viteConfig.ssr = { + noExternal: ['react', 'react-dom', 'react-dom/test-utils', 'react/jsx-runtime'], + }; } return viteConfig; |