I attempted to compile my project using vite,
my project - https://github.com/yakovcohen4/starbucks-openlayers
Running npm run dev
works fine.
However, I encountered an error when trying to build it.
Error message:
Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
I suspect the issue lies in trying to fetch data at this link (line 22+23) - https://github.com/yakovcohen4/starbucks-openlayers/blob/main/starbucks-project/src/main.ts
const shopsData = await fetchStarbucksShops();
If anyone has faced this problem before, I would appreciate any help.