Repository navigation
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
All reactions