Bundling and Import
This reference covers bundling your React components and importing them to Webflow.
Import
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:
CI/CD pipelines
For automated workflows, add the --no-input
flag to skip interactive prompts:
Important: Add change detection to prevent inadvertently removing components:
- Compare current library state with previous import
- Only share when components have actually changed
For more options, see the Webflow CLI reference. →.
Bundling
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:
- Custom CSS processing
- Specialized file handling (SVG, images, fonts)
- Build optimizations (tree shaking, code splitting)
To override the default configuration, see the guide on Webpack configuration overrides.
Using CSS frameworks and component libraries
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.
Bundle limits
Maximum bundle size: 50MB
Debugging
This section provides common debugging techniques for troubleshooting the bundling process and resolving configuration issues.
Disable minification for debugging
By default, the bundler minifies your code to reduce file size for production. To troubleshoot issues, you can disable minification. 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.
You can disable minification in two ways:
1. Via Webpack override
2. Via the CLI
Use the --dev
flag when bundling locally:
This will create a dist
folder with your bundled library.
Note: --public-path
is required for local bundling.
CSS modules
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:
Bundle locally
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.