Im bundling together the following files contents:
a.js:
class BaseC {
doIt(){
console.log(this);
}
}
class A extends BaseC{
}
b.js:
class B extends BaseC{
}
var b = new B()
b.doIt();
These are bundled in a final app.bundle.js. When running it i get : "Uncaught ReferenceError: BaseC is not defined". This is very odd to me as i can see it as defined first and foremost in the app.bundle.js prior to the rest of the classes as follows:.
var BaseC = function () {
function BaseC() {
_classCallCheck(this, BaseC);
}
_createClass(BaseC, [{
key: "doIt",
value: function doIt() {
console.log(this);
}
}]);
return BaseC;
}();
Any clues?
P.S: Im not using the require/import system. I know this is how webpack is normally used but what im doing is providing an array with all the js files i want bundled to webpack using the glob module and expected that with such a simple example, it should work.