When to Export
Export your scripts when:- Client handoff: Delivering final code to a client who won’t use GoodCraft Script
- Self-hosting: Hosting scripts on your own CDN or server
- Backup: Creating a local copy of all your scripts
- Migration: Moving scripts to another system
For most workflows, you don’t need to export. The loader script serves your code automatically with caching and optimization.
Export Modes
GoodCraft Script offers two export modes:Compressed Mode
Bundles all your scripts into a single file with built-in page routing. Output:- One JavaScript file (contains all JS scripts)
- One CSS file (contains all CSS scripts)
- Scripts are combined in priority order
- Page-specific scripts include routing logic
- The bundle checks the current URL and runs matching scripts
- Simple handoffs
- Single injection point
- When you want minimal files
Expanded Mode
Generates separate scripts with placement instructions. Output:- Individual script files
- Instructions for where to place each one
- Head code (dependencies, early-loading scripts)
- Global JavaScript (footer)
- Global CSS (head)
- Per-page scripts with specific instructions
- Detailed client handoffs
- When clients need to understand each script
- Webflow-native implementations
Export Options
Minify
Compresses the output by removing whitespace and shortening variable names.- On (default): Smaller file size, harder to read
- Off: Readable code, larger file size
Wrap in DOM Ready
Wraps scripts in aDOMContentLoaded event listener.
- On (default): Scripts wait for the DOM to be ready
- Off: Scripts run immediately
How to Export
Webflow Character Limits
Webflow has a 50,000 character limit for custom code fields. When exporting for Webflow, GoodCraft Script tracks this limit:- Warning threshold: At 40,000 characters, you’ll see a warning
- Limit exceeded: At 50,000 characters, the code won’t fit in Webflow
- Splitting scripts into page-specific code
- Using external scripts from CDN for large libraries
- Keeping the loader approach instead of exporting
The character count includes all whitespace and comments. Minification significantly reduces the count.
Change Detection
GoodCraft Script tracks whether your scripts have changed since the last export. In the Export tab, you’ll see:- Last exported: When you last exported
- Changes detected: Number of scripts modified since then
- Status indicator: Green (no changes) or yellow (changes pending)
Export Best Practices
Use Expanded mode for client handoffs
Use Expanded mode for client handoffs
Clients appreciate clear instructions on where to paste each piece of code. Expanded mode provides this context.
Turn off minification for editable code
Turn off minification for editable code
If the client might need to modify the code later, export without minification so it’s readable.
Document your scripts
Document your scripts
Before exporting, make sure script names are descriptive. These names appear in the export instructions.
Test after export
Test after export
Always test the exported code on a staging site before delivering to clients.
Keep using the loader when possible
Keep using the loader when possible
The loader provides automatic updates, caching, and optimization. Only export when you specifically need standalone files.