Skip to content

Commit

Permalink
Fix vue-jsx change (#10716)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Apr 8, 2024
1 parent 799f6f3 commit 903ed31
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 903ed31

Please sign in to comment.