adapter-auto
See original GitHub issueDescribe the problem
I’ve seen feedback from Vercel customers that SvelteKit ‘doesn’t work’, because it wasn’t clear to them that they needed to add an adapter. Even though it’s documented reasonably well, it’s definitely a source of friction. It would shock me if people using Kit with other platforms weren’t experiencing the same thing.
Describe the proposed solution
There’s probably a lot of value in having Kit auto-detect common platforms and build itself accordingly. (Nuxt does this, for example.) To that end I propose something like this in the default template:
import adapter from '@sveltejs/adapter-auto';
export default {
kit: {
adapter: adapter()
}
};
TBD which platforms would be supported here, but the adapters tend to be fairly small and have overlapping dependencies, so we can probably be generous.
Alternatives considered
Builds could fail noisily if an adapter isn’t configured. This would help with diagnosis, but it’s still friction.
Importance
would make my life easier
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:13
- Comments:18 (13 by maintainers)
does it actually require an adapter module at all? couldn’t the default behaviour just be to find and install the relevant adapter (and print a warning that you should probably configure your project correctly?)
Yeah that’s true. We probably don’t want anymore community adapters as dependencies for adapter-auto. (I thought my comment had mentioned that but I must’ve accidentally deleted it)