This reference covers bundling your React components and importing them to Webflow.
Import your components to Webflow using DevLink. DevLink bundles your component files and uploads them to your Workspace as a shared library.
Use the following command to import your components to Webflow:
For automated workflows, add the --no-input flag to skip interactive prompts:
Important: Add change detection to prevent inadvertently removing components:
For more options, see the Webflow CLI reference. →.
Webflow uses Webpack to bundle your component libraries. During this process, the bundler handles TypeScript compilation, resolves all dependencies and imports, optimizes your code for production, and generates bundles ready for import.
The default configuration handles most use cases automatically. Extend it when you need:
To override the default configuration, see the guide on Webpack configuration overrides.
If you’re using a CSS framework or component library, you may need to configure your project to handle the framework’s CSS. See the frameworks and libraries guide for more information.
Maximum bundle size: 50MB
This section provides common debugging techniques for troubleshooting the bundling process and resolving configuration issues.
By default, the bundler minifies your code to reduce file size for production. To troubleshoot issues, you can disable minification in your webpack configuration.
This keeps your bundled code readable and ensures that any errors you see in the browser’s developer console will have accurate line numbers that map back to your original source code.
When using a custom webpack configuration file, you must include the file in your webflow.json file by passing the path to the file in the bundleConfig property.
CSS Modules scope styles by generating unique class names, preventing conflicts between components.
By default, you must use bracket notation to access CSS classes:
To enable dot notation, and to use the default import syntax for CSS modules, update the css-loader configuration:
To test and debug your React components locally, you can bundle your library using the Webflow CLI command.
The public path is the URL where you can serve your bundled library. The CLI will generate a dist folder with your bundled library.
To inspect the final configuration being used by webpack, use the --debug-bundler option.