Bundling and Deployment
This guide covers bundling your components and deploying them to Webflow. You’ll also learn how to customize the build process for your specific needs.
Deployment
Share your components to Webflow using the Webflow CLI. This bundles your component files and uploads them to your Workspace as a library.
CI/CD deployment
For automated workflows, add the --no-input
flag to skip interactive prompts:
Important: Add change detection to prevent accidentally removing components:
- Compare current library state with previous deployment
- 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 deployable bundles ready for upload.
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)
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
Customize webpack configuration
Create a webpack.webflow.js
file to override the default configuration. Then reference it in your webflow.json
:
Debugging
Disable minification
For better error messages during development, disable minification:
Or use the --dev
flag when bundling locally:
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, update the css-loader
configuration:
Bundle locally
To test and debug your code 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.