Configure your Webflow project

Learn how to configure your Webflow project with the Webflow CLI.

The webflow.json file configures your Webflow project, defining how the CLI builds and deploys your code for each product. This file is created automatically when you run init commands, but you can modify it to customize behavior.

File location

Place webflow.json in your the root of your project:

my-webflow-project
src
webflow.json
package.json

Schema

The webflow.json supports configuration for:

  • Code Components
  • DevLink
  • Webflow Cloud
  • Designer Extensions

Each product has its own set of configuration options. See below for the configuration options for each product.

Code Components

webflow.json
1{
2 "library": {
3 "name": "<Your Library Name>",
4 "components": ["./src/**/*.webflow.@(js|jsx|mjs|ts|tsx)"],
5 "bundleConfig": "./webpack.webflow.js"
6 }
7}
FieldDescriptionRequired
nameThe name of your component library as it appears in WebflowYes
componentsGlob pattern matching your component files. To target a specific folder, use a path like src/my-components/**/*.webflow.tsx.Yes
bundleConfigPath to a custom webpack configuration fileNo

1{
2 "devlink": {
3 "rootDir": "./devlink",
4 "cssModules": true,
5 "fileExtensions": {
6 "js": "jsx"
7 }
8 }
9}

Configuration options

OptionDescriptionDefaultRequired
hostWebflow API host URLhttps://api.webflow.comNo
rootDirDirectory to export components into./devlinkYes
siteIdWebflow site IDprocess.env.WEBFLOW_SITE_IDNo
authTokenWebflow API authentication tokenprocess.env.WEBFLOW_SITE_API_TOKENNo
cssModulesEnable CSS modules for component stylestrueNo
allowTelemetryAllow anonymous usage analyticstrueNo
envVariablesInject environment variables into exported components{}No
componentsRegex pattern to match components to export.*No
overwriteModuleWhether to overwrite the module filetrueNo
fileExtensionsFile extensions for exported components{ js: ".js", css: ".css" }No
skipTagSelectorsExclude tag/ID/attribute selectors from global CSSfalseNo
relativeHrefRootControl how relative href attributes are resolved/No

While DevLink will try to assume reasonable defaults for most of the settings, you can specify certain options to customize the behavior of DevLink management and setup. See the DevLink documentation for more details.


Webflow Cloud

1{
2 "cloud": {
3 "projectId": "<Your Project ID>",
4 "framework": "astro"
5 }
6}
FieldDescriptionRequired
projectIdCloud project identifier. This is automatically set by the Webflow CLI when you run webflow cloud deploy.Yes
frameworkFramework preset either nextjs or astroYes

Designer Extensions

1{
2 "name": "<Your Extension Name>",
3 "apiVersion": "2",
4 "publicDir": "dist",
5 "appIntents": {
6 "image": ["manage"],
7 "form": ["manage"]
8 },
9 "appConnections": [
10 "myAppImageConnection",
11 "myAppFormConnection"
12 ]
13}
FieldDescriptionDefaultRequired
nameThe name of your extension as it appears in Webflow-Yes
apiVersionThe API version to use for your extension2Yes
publicDirThe directory to build and serve the extension fromdistYes
appIntentsThe element types that can create connections to your extension{}No
appConnectionsThe element types that can create connections to your extension[]No