[🐞]How to set q-data.json? The URL returned by v={hash} does not include this hash
Open
Nobody has claimed this yet.
bug
needs triage
- Dominant language
- TypeScript
- Stars
- 22.1k
- Forks
- 1.4k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 52
Description
Which component is affected?
Qwik Runtime
Describe the bug
Reproduction
/
Steps to reproduce
useVisibleTask$(() => {
if (typeof window !== 'undefined') {
const hash = document.documentElement.getAttribute('q:manifest-hash');
const _fetch = window.fetch;
window.fetch = function fetch(...args) {
if (typeof args[0] === 'string' && args[0].endsWith('q-data.json')) {
args[0] += `?v=${hash}`;
}
return _fetch.apply(this, args);
};
}
});
System Info
macos
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Qwik Runtime behavior around q-data.json and the q:manifest-hash attribute, then reproduce the issue using the supplied useVisibleTask$ fetch wrapper. Verify how the v={hash} query value is handled and whether the resulting redirect-page address contains the expected hash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100