question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Describe 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:closed
  • Created 2 years ago
  • Reactions:13
  • Comments:18 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
antonycommented, Nov 15, 2021

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?)

0reactions
bluwycommented, Dec 4, 2021

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)

Read more comments on GitHub >

github_iconTop Results From Across the Web

@sveltejs/adapter-auto - npm
Automatically chooses the adapter for your current environment, if possible.. Latest version: 1.0.0, last published: 13 days ago.
Read more >
adapter-auto - GitHub
No information is available for this page.
Read more >
Adapters • Docs • SvelteKit
Adapters are small plugins that take the built app as input and generate output for deployment. By default, projects are configured to use...
Read more >
Amazon.com: Motorola MA1 Wireless Android Auto Car Adapter
Our wireless android auto adapter connects to Android Auto on your car display. EASY TO USE: We make the setup simple for a...
Read more >
Carsifi: Wireless Android Auto adapter for all cars and head units
Carsifi is an adapter(dongle) that plug-in to Android Auto head unit and connect to your Android device Wirelessly. Make your life easier without...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found