HomeThe YearsImpressum
Kai Rautenberg

vue-moment blows up your vendor.js

to be precise importing vue-moment that is based on moment.js blows up your vendor.js by 200K. If you just want to present a date, consider to do it with a one-liner

let d = "2017-03-17T00:00:00.000+01:00"
let str = new Date(d).toLocaleDateString('de-DE', {
    day : 'numeric',
    month : 'short',
    year : 'numeric'
})
console.log(str) // 19. März 2017