{"record":{"id":"3f6fca7e2ccfa292","repo":"withastro/astro","slug":"more-than-one-jsx-renderer-is-enabled-this-will-l","errorCode":null,"errorMessage":"More than one JSX renderer is enabled. This will lead to unexpected behavior unless you set the `include` or `exclude` option. See https://docs.astro.build/en/guides/integrations-guide/preact/#combining-multiple-jsx-frameworks for more information.","messagePattern":"More than one JSX renderer is enabled\\. This will lead to unexpected behavior unless you set the `include` or `exclude` option\\. See https://docs\\.astro\\.build/en/guides/integrations-guide/preact/#combining-multiple-jsx-frameworks for more information\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/integrations/preact/src/index.ts","lineNumber":110,"sourceCode":"\t\t\t\t];\n\n\t\t\t\taddRenderer(getRenderer(command === 'dev'));\n\t\t\t\tupdateConfig({\n\t\t\t\t\tvite: viteConfig,\n\t\t\t\t});\n\n\t\t\t\tif (command === 'dev' && devtools) {\n\t\t\t\t\tinjectScript('page', 'import \"preact/debug\";');\n\t\t\t\t}\n\t\t\t},\n\t\t\t'astro:config:done': ({ logger, config }) => {\n\t\t\t\tconst knownJsxRenderers = ['@astrojs/react', '@astrojs/preact', '@astrojs/solid-js'];\n\t\t\t\tconst enabledKnownJsxRenderers = config.integrations.filter((renderer) =>\n\t\t\t\t\tknownJsxRenderers.includes(renderer.name),\n\t\t\t\t);\n\n\t\t\t\tif (enabledKnownJsxRenderers.length > 1 && !include && !exclude) {\n\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t'More than one JSX renderer is enabled. This will lead to unexpected behavior unless you set the `include` or `exclude` option. See https://docs.astro.build/en/guides/integrations-guide/preact/#combining-multiple-jsx-frameworks for more information.',\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t};\n}\n\nfunction configEnvironmentPlugin(compat: boolean | undefined): Plugin {\n\treturn {\n\t\tname: '@astrojs/preact:environment',\n\t\tconfigEnvironment(environmentName, options) {\n\t\t\tconst environmentOptions: EnvironmentOptions = {\n\t\t\t\toptimizeDeps: {},\n\t\t\t\tresolve: {},\n\t\t\t};\n\n\t\t\tif (environmentName === 'client') {","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/withastro/astro/blob/52e6c34790cc8ac4e69e6135ace06049867e5c4a/packages/integrations/preact/src/index.ts#L92-L128","documentation":"During astro:config:done the Preact integration checks config.integrations for other known JSX renderer integrations (@astrojs/react, @astrojs/preact, @astrojs/solid-js). If two or more are present and neither the include nor the exclude option was passed to the Preact integration, Vite cannot decide which JSX transform to apply per file, so this warning fires: JSX behavior will be inconsistent or wrong for one of the frameworks.","triggerScenarios":" astro.config.mjs registers both preact() and react() (or solid()) as integrations, and the preact() call has no include/exclude option. The astro:config:done hook counts 2+ known JSX renderers and logs the warning.","commonSituations":" Incrementally migrating a React site to Preact (both adapters installed temporarily); design systems mixing React components into a Preact app; examples/demos that install several renderer integrations at once.","solutions":["Scope each JSX integration to its file globs: preact({ include: ['**/preact/**'] }) and react({ include: ['**/react/**'] }) (or exclude the other framework's directories).","If only one framework is actually used, remove the unused renderer integration from config.","Restart the dev server (config hooks run at startup) and confirm the warning is gone.","See the linked docs section 'Combining multiple JSX frameworks' for the recommended glob layout."],"exampleFix":"// before\nexport default defineConfig({\n  integrations: [preact(), react()],\n});\n\n// after\nexport default defineConfig({\n  integrations: [\n    preact({ include: ['**/preact/**'], exclude: ['**/react/**'] }),\n    react({ include: ['**/react/**'], exclude: ['**/preact/**'] }),\n  ],\n});","handlingStrategy":"validation","validationCode":"const jsxIntegrations = ['@astrojs/react', '@astrojs/preact', '@astrojs/solid-js'];\nconst enabled = config.integrations.filter((i) => jsxIntegrations.includes(i.name));\nif (enabled.length > 1 && !(preactOptions.include || preactOptions.exclude)) {\n  throw new Error('Multiple JSX renderers require include/exclude scopes on preact()');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Whenever two JSX frameworks coexist, pass disjoint include/exclude globs to each integration.","Organize components in per-framework directories (src/react/**, src/preact/**) so scoping is trivial.","Remove unused renderer integrations from config after migrations finish."],"tags":["preact","jsx","multiple-frameworks","config","integrations"],"backgroundTag":"conflicting-jsx-renderers","analyzedSha":"52e6c34790cc8ac4e69e6135ace06049867e5c4a","analyzedAt":"2026-08-18T18:48:03.901Z","contentChangedAt":"2026-08-18T18:48:03.901Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}