Skip to content

In release build I can refresh #716

Answered by ctron
glennpierce asked this question in Q&A
Discussion options

You must be logged in to vote

That's a common problem of "single page applications". The URL in the browser's location bar is only changed visually. But it never requests that page. Until to trigger some kind of a reload.

Trunk know about this and by default (expect when using the --no-spa flag) returns the main resources instead of a 404, which does the trick.

With nginx you can do the same using:

http {

    server {
        listen       8080;
        server_name  _;
        root   /public;
        absolute_redirect off;

        error_page 404 =200 /index.html;

        location / {
            index index.html;
        }

    }

    types {
        application/wasm wasm;
    }

}

I have no idea about Apache, sorry.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@glennpierce
Comment options

Answer selected by glennpierce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #715 on February 15, 2024 10:32.