summaryrefslogtreecommitdiff
path: root/packages/integrations/react/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/react/src')
-rw-r--r--packages/integrations/react/src/index.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/integrations/react/src/index.ts b/packages/integrations/react/src/index.ts
index 46da29c7b..16f4064d0 100644
--- a/packages/integrations/react/src/index.ts
+++ b/packages/integrations/react/src/index.ts
@@ -100,6 +100,14 @@ export default function ({
injectScript('before-hydration', preamble);
}
},
+ 'astro:config:done': ({ logger, config }) => {
+ const knownJsxRenderers = ['@astrojs/react', '@astrojs/preact', '@astrojs/solid-js'];
+ const enabledKnownJsxRenderers = config.integrations.filter((renderer) => knownJsxRenderers.includes(renderer.name));
+
+ if (enabledKnownJsxRenderers.length > 1 && !include && !exclude) {
+ logger.warn('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/react/#combining-multiple-jsx-frameworks for more information.');
+ }
+ }
},
};
}