bringing back esModule check
bringing back esModule check