summaryrefslogtreecommitdiff
path: root/packages/integrations/vue/README.md
diff options
context:
space:
mode:
authorGravatar Bjorn Lu <bjornlu.dev@gmail.com> 2022-09-29 11:25:45 +0800
committerGravatar GitHub <noreply@github.com> 2022-09-29 11:25:45 +0800
commitfd9d323a68c0f0cbb3b019e0a05e2c33450f3d33 (patch)
treeb42267841c4f0af26b41172336149c421e1c5321 /packages/integrations/vue/README.md
parent24bad5a0ad6e3b64d9209aecffd8d0e9181135ad (diff)
downloadastro-fd9d323a68c0f0cbb3b019e0a05e2c33450f3d33.tar.gz
astro-fd9d323a68c0f0cbb3b019e0a05e2c33450f3d33.tar.zst
astro-fd9d323a68c0f0cbb3b019e0a05e2c33450f3d33.zip
Support Vue JSX (#4897)
Co-authored-by: Dan Jutan <danjutan@gmail.com>
Diffstat (limited to 'packages/integrations/vue/README.md')
-rw-r--r--packages/integrations/vue/README.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/packages/integrations/vue/README.md b/packages/integrations/vue/README.md
index 2a1f94c6f..75c861ce3 100644
--- a/packages/integrations/vue/README.md
+++ b/packages/integrations/vue/README.md
@@ -94,3 +94,40 @@ export default {
})],
}
```
+
+### jsx
+
+You can use Vue JSX by setting `jsx: true`.
+
+__`astro.config.mjs`__
+
+```js
+import { defineConfig } from 'astro/config';
+import vue from '@astrojs/vue';
+
+export default defineConfig({
+ integrations: [
+ vue({ jsx: true })
+ ],
+});
+```
+
+This will enable rendering for both Vue and Vue JSX components. To customize the Vue JSX compiler, pass an options object instead of a boolean. See the `@vitejs/plugin-vue-jsx` [docs](https://github.com/vitejs/vite/tree/main/packages/plugin-vue-jsx) for more details.
+
+__`astro.config.mjs`__
+
+```js
+import { defineConfig } from 'astro/config';
+import vue from '@astrojs/vue';
+
+export default defineConfig({
+ integrations: [
+ vue({
+ jsx: {
+ // treat any tag that starts with ion- as custom elements
+ isCustomElement: tag => tag.startsWith('ion-')
+ }
+ })
+ ],
+});
+```