Closed
Description
Describe the problem
- When developing with
svelte-kit dev
, theevent.platform
object is always empty, with no great way to mock it. - When building using an adapter like Cloudflare Workers,
event.platform
is empty for prerendering.
Describe the proposed solution
Ability to provide a platform
object in svelte.config.js
that is
- Substituted for
event.platform
whenevent.platform
is undefined. - Merged with
event.platform
, useful for specifying optional/default platform values. - Both?
Alternatives considered
Perhaps allowing a 'transform' function that accepts an event may be better, in case platform needs to change based on inputs?
Importance
would make my life easier
Additional Information
No response