This integration is powered by
@vitejs/plugin-vue
. To customize the Vue compiler, options can be provided to the integration. See the
@vitejs/plugin-vue
docs
for more details.
astro.config.mjs
import { defineConfig } from'astro/config';
import vue from'@astrojs/vue';
exportdefaultdefineConfig({
// ...
integrations: [
vue({
template: {
compilerOptions: {
// treat any tag that starts with ion- as custom elements
You can extend the Vue
app
instance setting the
appEntrypoint
option to a root-relative import specifier (for example,
appEntrypoint: "/src/pages/_app"
).
The default export of this file should be a function that accepts a Vue
App
instance prior to rendering, allowing the use of
custom Vue plugins
,
app.use
, and other customizations for advanced use cases.
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
for more details.
astro.config.mjs
import { defineConfig } from'astro/config';
import vue from'@astrojs/vue';
exportdefaultdefineConfig({
// ...
integrations: [
vue({
jsx: {
// treat any tag that starts with ion- as custom elements