496 views
Vue Tip: Check Version at Runtime
You can easily check the Vue version at runtime.
Ask my AI assistantMichael Hoffmann
@mokkapps

It's possible to check Vue's version at runtime by importing version from the Vue npm package and splitting the string at the . character:
<template>
<h1>Vue Version: {{ vueVersion }}</h1>
</template>
<script setup>
import { version } from 'vue'
const vueVersion = version.split('.')[0]
</script>