LlamaIndex Typescript to Javascript

How to convert LlamaIndex code written in typescript to javascript for use in a browser environment? I’m running into errors related to LlamaIndex imports.

I’m converting using “tsc filename.ts”. The file does get converted however, there are a lot of errors in the terminal related to LlamaIndex imports. This line of code throws errors if I try to use it in a browser environment:
Object.defineProperty(exports, “__esModule”, { value: true });
var llamaindex_1 = require(“llamaindex”);
How should I change my approach so that it works in a browser environment? Any help would be appreciated!