i have a problem: when trying to create my own meteor package and creating es6 classes (one class per file), somehow i don’t get it working because ether problem of that parent classes are not defined or a very strange “TypeError: Super expression must either be null or a function, not undefined”, BUT classes in one file are working with extends and super call…
class Parent
{
constructor()
{
}
}
class Child extends Parent
{
constructor()
{
super();
}
}
this simple code doesn’t work…
when inside a meteor package in separated files
(with and without export definition)
class Parent {} equates to var Parent = Parent {}, so is always (in Meteor) file scoped. One workaround is to make it global (package scoped): Parent = class Parent {}
It doesn’t give the solution to my problem. The solution was to add the ecmascript package. Once added you can remove window and you can also remove "use strict";.