Currently, we have to call the init() function in each pages corresponding load() function within the +page.ts file.
That means, we have to add the same code in multiple files to pass contents to the page.
We need a different approach. Where can we generate some data (at build time) based on the page routes lang parameter and pass it to the page so that it is accessible there?
Currently, we have to call the
init()
function in each pages correspondingload()
function within the+page.ts
file.That means, we have to add the same code in multiple files to pass contents to the page.
We need a different approach. Where can we generate some data (at build time) based on the page routes lang parameter and pass it to the page so that it is accessible there?
Opened a sveltekit discussion: https://github.com/sveltejs/kit/discussions/9272