QwikDev / QwikDev/qwik

[🐞]How to set q-data.json? The URL returned by v={hash} does not include this hash

Open
#8,303 1 comment 0 reactions 0 assignees View on GitHub

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
Image This will cause the browser address on the redirect page to display this hash
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.