[READ-ONLY] Mirror of https://github.com/danielroe/nuxt-vue3-module.
0

Configure Feed

Select the types of activity you want to include in your feed.

feat: display vue version

Daniel Roe (Jul 20, 2021, 2:49 PM +0100) fc8b1911 c9c36f32

+4 -2
+4 -2
src/index.ts
··· 1 - import { defineNuxtModule, extendBuild } from '@nuxt/kit' 1 + import { defineNuxtModule, extendBuild, requireModulePkg } from '@nuxt/kit' 2 2 import { readFile, writeFile } from 'fs-extra' 3 3 import type { Configuration } from 'webpack' 4 4 import { bold, greenBright } from 'chalk' ··· 16 16 console.info('disabling ssr due to issues with ssr support with vue3 + nuxt2') 17 17 } 18 18 19 - nuxt.options.cli.badgeMessages.push(greenBright(bold('[Vue 3 compatibility build]'))) 19 + const version = requireModulePkg('@vue/compat').version 20 + 21 + nuxt.options.cli.badgeMessages.push(greenBright(bold(`[Vue v${version}]`))) 20 22 21 23 nuxt.hook('build:templates', async (templates) => { 22 24 for await (const file of templates.templatesFiles) {