github withastro/astro @astrojs/vue@1.2.0

latest releases: astro@4.15.8, @astrojs/mdx@3.1.7, astro@4.15.7...
23 months ago

Minor Changes

  • #5075 d25f54cb9 Thanks @natemoo-re! - Add support for the appEntrypoint option, which accepts a root-relative path to an app entrypoint. The default export of this file should be a function that accepts a Vue App instance prior to rendering. This opens up the ability to extend the App instance with custom Vue plugins.

    // astro.config.mjs
    import { defineConfig } from 'astro/config';
    import vue from '@astrojs/vue';
    
    export default defineConfig({
      integrations: [
        vue({
          appEntrypoint: '/src/pages/_app',
        }),
      ],
    });
    // src/pages/_app.ts
    import type { App } from 'vue';
    import i18nPlugin from '../plugins/i18n';
    
    export default function setup(app: App) {
      app.use(i18nPlugin, {
        /* options */
      });
    }

Don't miss a new astro release

NewReleases is sending notifications on new releases.