Skip to content

Commit

Permalink
Remove unused config in Vue JSX integration (withastro#10687)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored and PeterDraex committed Apr 23, 2024
1 parent 436acee commit 6cb3eef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 22 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-forks-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/vue": patch
---

Removes unused `jsxTransformOptions` and `jsxImportSource` options from the renderer config
1 change: 0 additions & 1 deletion packages/integrations/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
18 changes: 0 additions & 18 deletions packages/integrations/vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) });
},
},
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6cb3eef

Please sign in to comment.