Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sveltejs/adapter-vercel

Package Overview
Dependencies
Maintainers
4
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sveltejs/adapter-vercel

Adapter for Svelte apps that creates a Vercel app, using a function for dynamic server rendering.

  • 1.0.0-next.32
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
51K
decreased by-4.59%
Maintainers
4
Weekly downloads
 
Created
Source

adapter-vercel

Adapter for Svelte apps that creates a Vercel app, using a function for dynamic server rendering.

Usage

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()
	}
};

Advanced Configuration

esbuild

As an escape hatch, you may optionally specify a function which will receive the final esbuild options generated by this adapter and returns a modified esbuild configuration. The result of this function will be passed as-is to esbuild. The function can be async.

For example, you may wish to add a plugin:

adapterVercel({
	esbuild(defaultOptions) {
		return {
			...defaultOptions,
			plugins: []
		};
	}
});

The default options for this version are as follows:

{
	entryPoints: ['.svelte-kit/vercel/entry.js'],
	outfile: `pathToLambdaFolder/index.js`,
	bundle: true,
	inject: ['pathTo/shims.js'],
	platform: 'node'
}

Changelog

The Changelog for this package is available on GitHub.

FAQs

Package last updated on 13 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc