figmx
v1.0.3
Published
Turn Figma Make exports into clean React + Vite + Tailwind apps
Maintainers
Readme
figmx
Turn Figma Make exports into clean React + Vite + Tailwind apps.
What it does
Takes a directory containing a Figma Make .zip + .make export pair and generates a production-ready React app:
- Extracts and resolves all image assets (auto-detects PNG, JPG, GIF, SVG, WebP)
- Rewrites
figma:asset/imports to standard asset paths - Tree-shakes unused components (Figma Make exports all shadcn/ui components)
- Cleans
package.json— removes unused deps, fixes peer dependencies - Applies CSS fixes for common Figma Make layout issues
Install
npm install -g figmxUsage
# Basic — output dir matches export name
figmx ./my-figma-export
# Custom output directory
figmx ./my-figma-export -o my-appThen:
cd my-app
npm install
npm run devHow it works
.zip + .make → validate → extract → analyze → transform → write → clean app- Validate — finds matching
.zip/.makefile pair in the directory - Extract — unzips both archives to a temp directory
- Analyze — traces imports from
main.tsx, identifies reachable files and assets - Transform — rewrites asset imports, detects file types via magic bytes, cleans dependencies
- Write — copies only reachable files, resolved assets, and cleaned config to output
Expected input
A directory containing two files exported from Figma Make:
project-name.zip— React source code withfigma:asset/importsproject-name.make— image assets archive (zip containingimages/folder)
Contributing
See CONTRIBUTING.md.
