You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would make testing and experimentation and debugging easier, and is just generally preferable to passing a string (or a [string, options] array which is a pattern I've always disliked).
Two downsides: it means adapters load eagerly rather than lazily (i.e. they get loaded in dev, even though they don't do anything) and it would mean adapters needed to expose CommonJS rather than ESM, unless we did this...
Then an adapter author can do this (as long as @sveltejs/kit is installed as a dev dependency):
/** * @param {{ whatever: number }} options * /export default async function adapter(options) { /** @type {import('@sveltejs/kit').Adapter */return{adapt: builder=>{// `builder` is typed}};}
Note that this is a different signature to the adapters at the moment, which expose a (builder, options) => void function as default. Would be nice to resolve this before the public beta, though @dummdidumm indicated that it would tricky to have an ESM config file (#349 (comment)) so we might be stuck shipping CJS for the time being.
At the moment you do this:
It might be nicer to do this...
It would make testing and experimentation and debugging easier, and is just generally preferable to passing a string (or a
[string, options]
array which is a pattern I've always disliked).Two downsides: it means adapters load eagerly rather than lazily (i.e. they get loaded in dev, even though they don't do anything) and it would mean adapters needed to expose CommonJS rather than ESM, unless we did this...
...which we can't at the moment because language tools requires the config to be CommonJS.
The text was updated successfully, but these errors were encountered: