Adapter for Svelte apps that creates a Vercel app, using a function for dynamic server rendering.
Add "@sveltejs/adapter-vercel": "next"
to the devDependencies
in your package.json
and run npm install
.
Then in your svelte.config.js
:
import vercel from '@sveltejs/adapter-vercel';
export default {
kit: {
...
adapter: vercel(options)
}
};
You can pass an options
argument, if necessary, with the following:
external
— an array of dependencies that esbuild should treat as external