Skip to content

Commit

Permalink
Fix vue-jsx change (withastro#10716)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored and PeterDraex committed Apr 23, 2024
1 parent 85ea333 commit 29a7053
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/integrations/vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ function getRenderer(): AstroRenderer {
};
}

function getJsxRenderer(): AstroRenderer {
return {
name: '@astrojs/vue (jsx)',
clientEntrypoint: '@astrojs/vue/client.js',
serverEntrypoint: '@astrojs/vue/server.js',
};
}

function virtualAppEntrypoint(options?: Options): Plugin {
const virtualModuleId = 'virtual:@astrojs/vue/app';
const resolvedVirtualModuleId = '\0' + virtualModuleId;
Expand Down Expand Up @@ -120,6 +128,9 @@ export default function (options?: Options): AstroIntegration {
hooks: {
'astro:config:setup': async ({ addRenderer, updateConfig }) => {
addRenderer(getRenderer());
if (options?.jsx) {
addRenderer(getJsxRenderer());
}
updateConfig({ vite: await getViteConfiguration(options) });
},
},
Expand Down

0 comments on commit 29a7053

Please sign in to comment.