mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Remove unused config in Vue JSX integration (#10687)
This commit is contained in:
parent
a15975e41c
commit
4ea042c388
4 changed files with 5 additions and 22 deletions
5
.changeset/few-forks-taste.md
Normal file
5
.changeset/few-forks-taste.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@astrojs/vue": patch
|
||||
---
|
||||
|
||||
Removes unused `jsxTransformOptions` and `jsxImportSource` options from the renderer config
|
|
@ -42,7 +42,6 @@
|
|||
"dependencies": {
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||
"@vue/babel-plugin-jsx": "^1.1.5",
|
||||
"@vue/compiler-sfc": "^3.3.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -19,21 +19,6 @@ function getRenderer(): AstroRenderer {
|
|||
};
|
||||
}
|
||||
|
||||
function getJsxRenderer(): AstroRenderer {
|
||||
return {
|
||||
name: '@astrojs/vue (jsx)',
|
||||
clientEntrypoint: '@astrojs/vue/client.js',
|
||||
serverEntrypoint: '@astrojs/vue/server.js',
|
||||
jsxImportSource: 'vue',
|
||||
jsxTransformOptions: async () => {
|
||||
const jsxPlugin = (await import('@vue/babel-plugin-jsx')).default;
|
||||
return {
|
||||
plugins: [jsxPlugin],
|
||||
};
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function virtualAppEntrypoint(options?: Options): Plugin {
|
||||
const virtualModuleId = 'virtual:@astrojs/vue/app';
|
||||
const resolvedVirtualModuleId = '\0' + virtualModuleId;
|
||||
|
@ -135,9 +120,6 @@ 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) });
|
||||
},
|
||||
},
|
||||
|
|
|
@ -5199,9 +5199,6 @@ importers:
|
|||
'@vitejs/plugin-vue-jsx':
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0(vite@5.2.7)(vue@3.4.21)
|
||||
'@vue/babel-plugin-jsx':
|
||||
specifier: ^1.1.5
|
||||
version: 1.2.2(@babel/core@7.24.3)
|
||||
'@vue/compiler-sfc':
|
||||
specifier: ^3.3.8
|
||||
version: 3.4.21
|
||||
|
|
Loading…
Reference in a new issue