addVitePlugin allows you add a vite plugin to the Astro config. For example:
addVitePlugin
import { defineIntegration } from "astro-integration-kit";import { addVitePluginPlugin } from "astro-integration-kit/plugins";import { VitePWA } from 'vite-plugin-pwa' export default defineIntegration({ name: "my-integration", plugins: [addVitePluginPlugin], setup(options) { return { "astro:config:setup": ({ addVitePlugin }) => { addVitePlugin(VitePWA({ registerType: 'autoUpdate' })) } } }})
import type { AstroIntegration } from "astro";import { addVitePlugin } from "astro-integration-kit/utilities";import { VitePWA } from 'vite-plugin-pwa' export default function myIntegration(): AstroIntegration { return { name: "my-integration", hooks: { "astro:config:setup": ({ config, logger, updateConfig }) => { addVitePlugin({ plugin: VitePWA({ registerType: 'autoUpdate' }), config, logger, updateConfig }) } } }}