Using tsl-mastodon-api in angular project: Top-level await is not available in the configured target environment

70 Views Asked by At

I have an angular 17 project that uses the tsl-mastodon-api (0.4.1) as a dependency. tsconfig says "target": "ES2022" but I still get:

✘ [ERROR] Top-level await is not available in the configured target environment ("chrome119.0", "edge119.0", "firefox115.0", "ios16.0", "safari16.0" + 7 overrides)

node_modules/tsl-mastodon-api/lib/Bridge.js:21:5:
  21 │     (await import('node-fetch')).default);

Not sure what to do as the await is part of the library and anyway my build target should support it.

0

There are 0 best solutions below