Closed intellix closed 1 week ago
@intellix Copying additional files into the locale folders would not be a problem, but in theory this is only necessary for localized chunks (and not for json or css).
PrefetchGraph
and PrefetchServiceWorker
are APIs still in alpha preview, I haven't studied them yet and I still don't know their features.
From the doc (https://qwik.dev/api/qwik/#prefetchgraph) I see that you can set the base url:
<PrefetchServiceWorker base={"/build/"} scope="/" />
<PrefetchGraph base={"/build/"} />
And from what I see, this seems to be enough to avoid the 404 errors.
I can confirm the above works, thanks for pointing it out to me :)
We've just updated to qwik 1.8.0 with the new PrefetchWorker and we're using qwik-speak for localisation. When I look at our build directory I can see that we have bundles inside locale folders, and q-bundle-graph JSON files that aren't copied in, like so:
I was looking at network requests and noticed that we're getting a 404 request for q-bundle-graphs, because they're not copied into the locale folders at build time.
A request for /build/en-US/q-bundle-graph-oym6qj.json is made there because of q-base pointing to the locale to load the language specific bundles with the languages pre-baked in:
Forgive me if it's not a qwik-speak specific issue, but could the vite plugin here copy across the q-bundle-graph files into the language specific directories?
I believe the q-bundle-graphs are coming from the new PrefetchWorker