It is required to create an instance of the module in javascript ES6 and upgrade to ES5. I am creating a new class in my project which is es6 / webpack. I have 2 files: track.js, which has the following -
export default class Track { constructor() { this.o = {}; } }
Another is index.js -
import { Track } from './track'; const track = new Track(); console.log(track);
I am trying to make the console log show an empty object. Instead, I get - Uncaught TypeError: _track.Track is not a constructor
Yasir source share