Svelte · Middle · Question 73 of 75
What happens if both +page.js and +page.server.js export load?
- ✓Correct answer: The server
loadruns first and its result is passed to the universalloadasdata; the universal result goes to the page - 2Only
+page.server.jsis used - 3SvelteKit throws an error
Explanation
This lets you fetch on the server and then add non-serializable things, like a component, in the universal load.