Configure your Webflow app

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

The webflow.json file configures your Webflow app, 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 the root of your app:

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 "siteId": "<Your Site ID>",
3 "devlink-export": {
4 "rootDir": "./webflow",
5 "components": ".*",
6 "componentGroups": ".*",
7 "ts": true,
8 "cssScopes": true,
9 "relativeHrefRoot": "/"
10 }
11}

Configuration options

siteId sits at the top of webflow.json; every other option below lives under the devlink-export object.

OptionDescriptionDefaultRequired
siteIdWebflow site IDprocess.env.WEBFLOW_SITE_IDNo
rootDirDirectory to export components into./webflowYes
cssScopesEnable CSS @scope wrapping for component stylestrueNo
tsGenerate TypeScript files for exported componentsAuto-detected from tsconfig.json and .ts/.tsx files in the project on first exportNo
componentsRegex pattern to match components to export.*No
componentGroupsRegex pattern to match component groups to export.*No
relativeHrefRootHow relative href values are rewritten in exported Link and Image components/No

DevLink assumes reasonable defaults for most of the settings, but 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 "app_id": "<Your App ID>",
4 "framework": "astro"
5 }
6}
FieldDescriptionRequired
app_idCloud app identifier. This is automatically set by the Webflow CLI when you run webflow cloud deploy.Yes
frameworkFramework preset either nextjs or astroYes

Legacy project_id field

Before this rename, the Webflow CLI wrote a project_id field to webflow.json. The CLI still reads project_id as a fallback, so existing manifests keep working without changes. New deploys always write app_id. A future major release will drop the legacy field — feel free to switch your manifest to app_id whenever you redeploy.


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