0๐
โ
I figured it out.
I needed to import and export in a specific way so my Example.vue:
<template>
<div>
<h1>Example: {{message}}</h1>
</div>
</template>
<script>
import Example from '../ViewModels/Example';
export default {
data() {
return new Example();
}
}
</script>
and my Example.js class file:
export default class Example {
constructor() {
this.message = "Hello World";
}
}
Source:stackexchange.com