I have defined a class like this (usage.js):
Does not work
module.exports = class abc {
constructor() {
}}
But if I export the below way it works
Working
class abc {
constructor() {
}}
module.exports = abc;
Usage of class in file calling.js
const abc = require('./usage');
let abcinstance = new abc() -- Error - abc is not a contructor
What is wrong in the first way ?