Vercel
Read time: 4 minutes
Last edited: Dec 14, 2024
The Vercel integration is only available to customers on select plans. To learn more, read about our pricing. To upgrade your plan, contact Sales.
Overview
This topic explains how to use LaunchDarkly's Vercel integration. This integration enables flag evaluation within Vercel Edge Workers or Vercel Edge Middleware. The integration writes the latest flag data from the configured environment directly to a Vercel Edge Config in your account. It also sends any change to a flag or segment configuration in your selected environment to your Vercel Edge Config, ensuring your Edge Config is always up to date.
Vercel enforces size limits on Edge Config values. Additionally, Vercel charges customers for Edge Config writes. Each feature flag or segment change in an environment where the integration is installed will incur an Edge Config write. Based on these limits, Vercel Enterprise customers and Vercel Pro customers with moderately-sized environments are likely to benefit the most from this integration. To learn more, read Vercel's documentation on Edge Config Limits and pricing.
You must install and configure the Vercel SDK to use this integration. To learn more, read Vercel SDK reference.
You can use the Vercel integration to bootstrap your application with the latest client-side feature flags. This eliminates the initial remote call to LaunchDarkly, providing zero-latency client-side feature flags with no flash of original content or shift in content layout. The Vercel integration also enables flag evaluations within Vercel Edge Middleware and Vercel Edge Workers. This means you can use your LaunchDarkly flags without an added latency from network requests.
Install a Vercel integration
For the Vercel integration to work, you need a Vercel account with at least one project.
You can install a Vercel integration on the LaunchDarkly page in the Vercel integrations marketplace.
Vercel Edge Configs enforce size limits that might be smaller than your LaunchDarkly flag data in a given environment. We recommend using a dedicated Edge Config for LaunchDarkly environments.
To learn more, read about Edge Config limits and pricing.
To install a Vercel integration for your environment:
- Navigate to Vercel's Integrations page for LaunchDarkly.
- Click Add Integration.
- Select the Vercel account that you would like to connect to LaunchDarkly.
- Choose the projects within that account that you would like LaunchDarkly to have access to.
- Click Continue.
- Review the permissions that this integration requires. Then click Add Integration. A LaunchDarkly configuration screen appears:
- Click Authorize to grant access to the LaunchDarkly integration.
- Enter a Name for the integration. This integration is specific to this combination of your LaunchDarkly environment and the Vercel edge config ID.
- Choose an environment from the Environment menu. Your data will appear in your Edge Config under the key
LD-Env-{{environment client-side ID}}
. - Choose an Edge Config from the Edge Config menu. Alternatively, click Click to create new edge config to create a new edge config.
- Click Save configuration.
Configure the LaunchDarkly Vercel integration
You can manage Vercel integrations on the LaunchDarkly page in the Vercel integrations marketplace.
To manage an existing Vercel integration:
-
In Vercel, navigate to the Integrations dashboard.
-
Find your LaunchDarkly integration and click Manage.
-
Click Configure. A LaunchDarkly configuration panel appears.
-
Click Edit to modify the integration. You can change the configuration name or select another Edge Config destination to export to.
-
Click Save to save your changes.
Uninstall the LaunchDarkly Vercel integration
To uninstall an existing Vercel integration:
- In Vercel, navigate to the Integrations dashboard.
- Find your LaunchDarkly integration and click Manage.
- Click Configure. A LaunchDarkly configuration panel appears.
- Click Delete to delete each integration configuration.
- Return to the Vercel integration dashboard.
- Click Remove Integration.
Removing the integration from your Vercel account will not remove any existing integration configurations. Follow the steps above to delete them as part of the removal process. If you have forgotten to do so, you can still delete configurations from the LaunchDarkly Integrations page.