sveltejs / sapper

The next small thing in web development, powered by Svelte
https://sapper.svelte.dev
MIT License
7k stars 434 forks source link

Pass polka.Request to preload() #1436

Closed ghost closed 4 years ago

ghost commented 4 years ago

Is your feature request related to a problem? Please describe. intl. I need to clone a translator across requests. I'm able to map to which request the cloned translator belongs during a middleware, but I'm not able to access this request on preload().

Describe the solution you'd like Third parameter on preload(), polka.Request, or undefined on browsers.

Describe alternatives you've considered It's not possible.

How important is this feature to you? A bit.

Additional context

antony commented 4 years ago

Is this something you could seed the session with?

ghost commented 4 years ago

@antony Probably yes, I'll try it soon.