Syntax highlighting with highlight.js for Vue.js 3.x
npm install vue3-highlightjsVue.js 3.x syntax highlighting made easy, using highlight.js.
npm install --save vue3-highlightjs or use dist/vue3-highlight.min.js
For vue-cli/vite user:
``javascript
import { createApp } from 'vue'
import VueHighlightJS from 'vue3-highlightjs'
import 'highlight.js/styles/solarized-light.css'
const app = createApp({})
app.use(VueHighlightJS)
`
For standalone usage:
`html`
In Vue sfc
`html
const s = new Date().toString()In html
`html
const s = new Date().toString()
``