preactConfig
Shared Vite resolution settings for Preact application builds.
Compatibility
ReactRenderer-specific API; check the documented import for this renderer.
React SSRRenderer-specific API; check the documented import for this renderer.
PreactServer/build API, not a browser import.
Preact SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.
Import from @kasperrt/smolter/preact/vite
Signature
const preactConfig: UserConfig;Parameters
A UserConfig object; merge it with your configuration if not using applicationPlugins.
Returns
Aliases React-compatible library imports to Preact and deduplicates Preact. It also supplies SSR and dependency optimization settings.
Usage
Shared Vite resolution settings for Preact application builds.
export default mergeConfig(preactConfig, { build: { manifest: true } });Behavior and limits
applicationPlugins applies these settings automatically. The configuration belongs in Vite, not a browser entry.