Hi, I am currently trying to fetch a .json, which I just need to import an array, that I then assign to a signal. But I can't seem to get the path right (do I need API / Proxy?), and before that I had the problem of top level await not being allowed in my build target ES2019. At first I used async functions outside of my exported component, and now currently I am trying to fetch the data with createResource.
my current createResource approach
// quotes.json located at src/assets/quotes/quotes.json called in src/routes/quotes.tsxconst [quotes] = createResource(async () => { const response = await fetch("../assets/quotes/quotes.json"); return (await response.json()) as Quotes;});
// quotes.json located at src/assets/quotes/quotes.json called in src/routes/quotes.tsxconst [quotes] = createResource(async () => { const response = await fetch("../assets/quotes/quotes.json"); return (await response.json()) as Quotes;});