com um clique
documentation-robotics-viewer-build
Run Vite build and check bundle size
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Run Vite build and check bundle size
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Start Storybook server and list available stories
Sync OpenAPI specs and generate TypeScript types
Display architectural overview and critical file locations
Build Docker image and run deployment checks
Show coding patterns for React Flow nodes, Zustand, and Tailwind
Run Playwright tests and Storybook validation
| name | documentation_robotics_viewer-build |
| description | Run Vite build and check bundle size |
| user_invocable | true |
| args | ["dev|prod|analyze"] |
| generated | true |
| generation_timestamp | "2026-02-23T16:07:52.207Z" |
| generation_version | 2.0 |
| source_project | documentation_robotics_viewer |
| source_codebase_hash | 00a2f9723e9a7f64 |
Quick-reference skill for running Vite builds and analyzing bundle sizes in the documentation_robotics_viewer project.
/documentation_robotics_viewer-build [dev|prod|analyze]
Args:
dev - Start Vite development server with HMRprod - Production build with minification and bundle reportanalyze - Production build with detailed bundle analysis (rollup-plugin-visualizer)Run Vite 6.4.0 builds for the React 19.2.0 + TypeScript 5.9.3 visualization app. This skill:
src/core/ + src/apps/embedded/)dev)Start the Vite development server with Hot Module Replacement:
npm run dev
# Opens http://localhost:5173
# Watch mode with instant HMR for React components, nodes, edges, stores
Post-Start Checks:
prod)Build optimized production bundle:
npm run build
# Runs: vite build
# Outputs to: dist/
Post-Build Analysis:
ls -lh dist/assets/
# Look for:
# - index-*.js (main bundle - target <200KB gzipped)
# - vendor-*.js (React Flow, D3, layout engines - target <250KB gzipped)
# - *.css (Tailwind CSS v4 - target <50KB gzipped)
du -sh dist/
du -h dist/assets/*.js | sort -h
# Identify largest chunks
ls dist/assets/ | grep -E "^[a-z]+-[a-z0-9]+\.js$"
# Should see separate chunks for:
# - Core nodes (business, motivation, c4)
# - Layout engines (dagre, elk, d3-force, graphviz)
# - Route components (if using lazy loading)
Expected Bundle Breakdown:
dagre - Hierarchical layoutselkjs - Eclipse Layout Kerneld3-force - Force-directed layouts@hpcc-js/wasm - GraphViz WASManalyze)Generate interactive bundle visualization:
npm run build -- --mode analyze
# OR if script exists:
npm run build:analyze
# If rollup-plugin-visualizer is configured, this generates:
# dist/stats.html - Interactive treemap of bundle composition
Analysis Steps:
# If stats.html exists:
open dist/stats.html # macOS
xdg-open dist/stats.html # Linux
Identify Optimization Opportunities:
Check Critical Path:
/documentation_robotics_viewer-build dev
Output:
Starting Vite dev server...
✓ Ready in 342ms
➜ Local: http://localhost:5173/
✓ HMR enabled for:
- 15 custom nodes (GoalNode, StakeholderNode, BusinessFunctionNode...)
- 4 layout engines (Dagre, ELK, D3Force, Graphviz)
- 8 Zustand stores (modelStore, layerStore, elementStore...)
/documentation_robotics_viewer-build prod
Output:
Building for production...
✓ 127 modules transformed
✓ Built in 2.4s
dist/index.html 2.1 KB
dist/assets/index-a3b2c1d4.css 45.2 KB │ gzip: 12.3 KB
dist/assets/index-e5f6g7h8.js 187.4 KB │ gzip: 61.2 KB
dist/assets/vendor-i9j0k1l2.js 234.6 KB │ gzip: 78.5 KB
✓ Bundle size check: PASSED
Total: 467.2 KB (151.8 KB gzipped) - under 500KB budget ✓
Breakdown:
@xyflow/react: 118.3 KB (39.1 KB gzipped)
Layout engines: 156.7 KB (52.3 KB gzipped)
React + React DOM: 128.9 KB (42.7 KB gzipped)
Application code: 63.3 KB (17.7 KB gzipped)
/documentation_robotics_viewer-build analyze
Output:
Building with bundle analysis...
✓ Bundle visualization generated: dist/stats.html
Top 5 Largest Dependencies:
1. elkjs (87.2 KB) - Consider lazy loading for ELK layout engine
2. @xyflow/react (118.3 KB) - Core dependency, cannot reduce
3. d3-force (34.5 KB) - Used by force-directed layout
4. dagre (28.9 KB) - Used by hierarchical layout
5. @hpcc-js/wasm (45.1 KB) - GraphViz WASM, consider lazy loading
Recommendations:
✓ Code splitting is working (3 chunks)
⚠ Consider lazy-loading layout engines (load on first use)
⚠ elkjs is the largest layout engine - split into separate chunk
✓ Tree-shaking is effective (React Flow reduced from 150KB to 118KB)
Open dist/stats.html to explore bundle composition interactively.
Target Sizes (Gzipped):
Red Flags:
After running builds, verify:
Build Fails with TypeScript Errors:
npm run build
# Fix TypeScript strict mode errors first
npm run type-check # If script exists
Bundle Size Exceeds Budget:
/documentation_robotics_viewer-build analyzenpm ls <package>)HMR Not Working in Dev Mode:
vite.config.ts)This skill was automatically generated based on Vite 6.4.0 build tooling and React 19.2.0 architecture.