Skip to content

Commit

Permalink
Add Vue JSX options example
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Sep 28, 2022
1 parent 9edd863 commit 766ade7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/integrations/vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default {
### jsx

You can use Vue JSX by setting `jsx: true`.

__`astro.config.mjs`__

```js
Expand All @@ -112,3 +113,21 @@ export default defineConfig({
```

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-')
}
})
],
});
```

0 comments on commit 766ade7

Please sign in to comment.