Issue with vite-plugin-top-level-await #473
spokospace
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm trying to use await via plugin: https://github.com/Menci/vite-plugin-top-level-await
In pinia store I'm using:
to load categories list from json file (in 'public/db/' directory).
Everything works fine on dev, but I have problem with vite-ssg build.
I tried with vite-plugin-top-level-await plugin, but it also doesn't work with vite-ssg:
There is any other way to using local json files with pinia and vite-ssg?
I tried also with:
const res = await fetch('./../../db/categories.json')
but it also doesn't work.
Beta Was this translation helpful? Give feedback.
All reactions