Creating class in a .vue



I’ve a file.js which is working and I’m trying to make a VueJS app, so I’m trying to use mixins to make his old js working on VueJS.

In this file I have some classes (Object classes and not CSS classes).
My question is, how do I declare my classes in my File.vue and where can I make my
let map = new leafletMap() ?

Thanks for your help :slight_smile:


Is leafletMap your own custom created class or it’s some library class?


It’s a own custom created class.


Most probably in mounted() lifecycle hook


Depends on if your constructor needs external data or not.