mirror of
https://github.com/withastro/astro.git
synced 2025-01-27 22:19:04 -05:00
Fix vue-jsx change (#10716)
This commit is contained in:
parent
799f6f3f29
commit
903ed31b2a
1 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
|
@ -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) });
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue