That js file certainly doesn't look like a normal module to me that I would expect when importing a module.
But I'm not too familiar with the JS ecosystem to the point where I know what that dynamic Object.defineProperty(exports, "__esModule" magic does or how it's supposed to be used.
But I can see why the import would result in undefined.
With my first search of LemmyHttp I land on https://join-lemmy.org/api/classes/LemmyHttp.html, which says Defined in src/http.ts:153. Have you considered importing http.js? Looking at the http.js on the CDN I can at least see the LemmyHttp class type you seem to try to import.