I tested the code in a minimal environment using vite and get the following error.
X [ERROR] Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides)
We have prepared the code for testing in the following repository
This problem does not occur with min-node, but can be reproduced with min-vite.
https://github.com/rinjugatla/denokv-for-issue
I tested the code in a minimal environment using vite and get the following error.
We have prepared the code for testing in the following repository This problem does not occur with min-node, but can be reproduced with min-vite. https://github.com/rinjugatla/denokv-for-issue
This problem could also be solved by installing the following plugin. https://github.com/Menci/vite-plugin-top-level-await