While using the Pdfjs library, I encountered an error message that reads:
Top-level await is not available in the configured target environment ("chrome119.0", "edge119.0", "firefox115.0", "ios16.0", "safari16.0" + 7 overrides)
/****/ webpack_exports = globalThis.pdfjsLib = await (globalThis.pdfjsLibPromise = webpack_exports);**
There was a suggestion on Github to resolve this issue with Vite, however, Vite is not part of my project setup.
This excerpt is from my tsconfig file:
{
"compileOnSave": false,
// Compiler options listed here...
}
Please refer to this link for more information.
I attempted changing the target in tsconfig from ES2022 to ESNext, but unfortunately, it did not resolve the issue.