I am facing any issue in react.
Here How I am defining the class BackendServiceClient
class BackendServiceClient {
private readonly source: string;
constructor(source?: string) {
if (source) {
this.source = source;
}
axios.defaults.headers = this.setDefaultHeaders();
}
}
.... some logic
export default BackendServiceClient;
This how the BackendServiceClient is export in index.ts in common library in this class we export all the vars that could be used by clients of the library
export { default as BackendServiceClient} from './api/BackendServiceClient';
While building this commons library into my application I got error
commons.BackendServiceClient is not constructor
and when checked the line causing errors from file in node modules
backendServiceClient: /*#__PURE__*/new commons.BackendServiceClient(),
Does someone have faced this issue ? Thanks