Skip to content

Commit

Permalink
Update packages/integrations/vue/src/index.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Lefebvre <[email protected]>
  • Loading branch information
louisescher and florian-lefebvre authored Jan 10, 2025
1 parent acd750c commit 1a99419
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/integrations/vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,13 @@ export default function (options?: Options): AstroIntegration {
updateConfig({ vite: await getViteConfiguration(command, options) });
},
'astro:config:done': ({ logger, config }) => {
if (!options?.jsx) return;

const knownJsxRenderers = ['@astrojs/react', '@astrojs/preact', '@astrojs/solid-js'];
const enabledKnownJsxRenderers = config.integrations.filter((renderer) => knownJsxRenderers.includes(renderer.name));

// This error can only be thrown from here since Vue is an optional JSX renderer
if (enabledKnownJsxRenderers.length > 1 && !options?.include && !options?.exclude && options?.jsx) {
if (enabledKnownJsxRenderers.length > 1 && !options?.include && !options?.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/solid-js/#combining-multiple-jsx-frameworks for more information.');
}
}
Expand Down

0 comments on commit 1a99419

Please sign in to comment.