I am trying to incorporate a Vue component called vue-timeago
:
import VueTimeago from 'vue-timeago'
Vue.use(VueTimeago, {
name: 'Timeago', // Component name, `Timeago` by default
locale: undefined, // Default locale
locales: {
'zh-CN': require('date-fns/locale/zh_cn'),
'ja': require('date-fns/locale/ja'),
}
})
My web application was not built as a complete Vue app. Instead, I utilized Django's templates feature and added Vue as an add-on on each page:
<script>
let app = new Vue({
delimiters: ['[[',']]'],
el: '#app',
data: {
},
...
Is there a way for me to implement the mentioned component in this setup? Thank you!