Skip to content

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

@AllenIverson1122

Description

@AllenIverson1122

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions