diff options
Diffstat (limited to 'packages/integrations/preact/src')
-rw-r--r-- | packages/integrations/preact/src/index.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/integrations/preact/src/index.ts b/packages/integrations/preact/src/index.ts index 67a972475..5c5ed0363 100644 --- a/packages/integrations/preact/src/index.ts +++ b/packages/integrations/preact/src/index.ts @@ -78,8 +78,15 @@ function getViteConfiguration(compat?: boolean): ViteUserConfig { { find: 'react-dom', replacement: 'preact/compat' }, { find: 'react/jsx-runtime', replacement: 'preact/jsx-runtime' }, ], - dedupe: ['preact/compat'], + 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', + ]; } return viteConfig; |