Learning ES6 and have run in to the following error straight off Super expression must either be null or a function, not undefined.
Really unsure where my problem is, if anyone could help that would be great.
main.js
'use strict'
import Backbone from 'exoskeleton';
import App from './views/App';
var onDOMReady = () => {
console.log('inside dom ready');
window.app = new App();
}
if(document.readyState === 'complete' || document.readyState === 'interactive' || document.readyState === 'loaded' ) {
onDOMReady();
} else {
document.addEventListener('DOMContentLoaded', onDOMReady);
}
App.js
'use strict'
import Backbone from 'exoskeleton';
class App extends Backbone.View {
initialize () {
console.log('App: Init');
}
render () {
console.log('App: Render');
}
}
export default App;
I got this error because I had a circular import structure. One module importing another and the other way around.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With