What problem does it solve?
Adapting Mpx mini-program code to run on React Native (iOS, Android, Harmony) involves many subtle differences across templates, scripts, styles, and JSON configuration, and mistakes often surface only as obscure compile or runtime errors. This Skill provides a structured development and adaptation guide plus a real compile-validation script so Mpx2RN work is checked against actual platform constraints.
Core Features & Use Cases
- Four-dimension adaptation guidance: Indexed references covering template, script, style, and JSON configuration capabilities and constraints for RN output, including conditional compilation and atomic CSS (UnoCSS) support boundaries.
- Development checklist and workflow: A mandatory constraint checklist for adaptation, new component creation, error troubleshooting, and Code Review, with per-block implementation steps.
- Real compile validation: The bundled compile-validate.js script runs the host project's @mpxjs/mpx-cli-service webpack build against .mpx files for targets like ios, android, and harmony, aggregating errors and warnings by category.
- Use Case: When migrating an existing WeChat mini-program page to React Native, follow the checklist to replace unsupported selectors and APIs, isolate RN-specific code with conditional compilation, then run the validation script until zero errors and warnings remain.
Quick Start
Ask the assistant to adapt or review a specific .mpx page or component for Mpx2RN output and validate it with the compile-validate script for your target platforms.