We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double execution of the page on the server side, at server startup, when the page is open in a web browser.
You will see a double log from src/routes/+page.svelte in the terminal:
src/routes/+page.svelte
test page.svelte test page.svelte
When the page is not open in the browser, the log is only one, when firing up the server
Why does it work this way? Is this how it should work?
No response
System: OS: Linux 5.10 Arch Linux CPU: (4) x64 AMD Athlon(tm) X4 950 Quad Core Processor Memory: 6.52 GB / 15.07 GB Container: Yes Shell: 5.1.8 - /bin/bash Binaries: Node: 18.4.0 - ~/.nvm/versions/node/v18.4.0/bin/node Yarn: 1.22.10 - /usr/bin/yarn npm: 8.12.1 - ~/.nvm/versions/node/v18.4.0/bin/npm Browsers: Brave Browser: 100.1.37.109 Firefox: 102.2.0esr npmPackages: @sveltejs/adapter-auto: next => 1.0.0-next.76 @sveltejs/kit: next => 1.0.0-next.489 svelte: ^3.46.0 => 3.50.1 vite: ^3.1.0 => 3.1.3
annoyance
The text was updated successfully, but these errors were encountered:
If I add some logging to a load function in src/routes/+page.server.js...
load
src/routes/+page.server.js
export function load({ request }) { console.log(request.method, Object.fromEntries(request.headers)); }
...I see this:
GET { accept: '*/*', 'accept-encoding': 'gzip, deflate, br', 'accept-language': 'en-US,en;q=0.5', connection: 'keep-alive', cookie: 'userid=e8c7c84e-c4bf-44f8-809e-2cfa1e45faf3; name=SvelteKit', dnt: '1', host: 'localhost:5173', 'if-none-match': '"1iy0ruo"', referer: 'http://localhost:5173/', 'sec-fetch-dest': 'empty', 'sec-fetch-mode': 'no-cors', 'sec-fetch-site': 'same-origin', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:104.0) Gecko/20100101 Firefox/104.0' } test page.svelte GET { accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'accept-encoding': 'gzip, deflate, br', 'accept-language': 'en-US,en;q=0.5', connection: 'keep-alive', cookie: 'userid=e8c7c84e-c4bf-44f8-809e-2cfa1e45faf3; name=SvelteKit', dnt: '1', host: 'localhost:5173', 'if-none-match': '"1iy0ruo"', 'sec-fetch-dest': 'document', 'sec-fetch-mode': 'navigate', 'sec-fetch-site': 'cross-site', 'upgrade-insecure-requests': '1', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:104.0) Gecko/20100101 Firefox/104.0' } test page.svelte
I believe the first request is coming from the Vite HMR client, though it's difficult to be sure.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
Double execution of the page on the server side, at server startup, when the page is open in a web browser.
Reproduction
You will see a double log from
src/routes/+page.svelte
in the terminal:When the page is not open in the browser, the log is only one, when firing up the server
Why does it work this way? Is this how it should work?
Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: