What's the recommendation to where to place a json file in the ExB file structure and how to access it with the local pathname.
I am using fetch to read the json file but it seems that I cannot to access it if I use a local file.
For anyone who may have the same question, this is what I did
I placed my data folder under the src/runtime and instead of fetch, I used
import data from "./data/info.json";
If you run into issues accessing your json file, then add this:
const loadedData = JSON.stringify(data); const json = JSON.parse(loadedData);
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.