I have the following class inside /lib/Test.js:
export class Test {
constructor() {
console.log("this is a test");
}
}
and in my main.js I'm trying to do the following:
import { Test } from "Test";
console.log(Test);
I'm getting the following error message:
TypeError: Object is not a constructor (evaluating 'new (require('/alloy/controllers/' + name))(args)')
How can I work with ES6 modules in Titanium?