What problem does it solve?
Mpx code written for mini-programs often breaks or behaves differently when compiled to React Native (iOS, Android, Harmony). This Skill provides the constraints, capability references, and compile validation needed to develop, migrate, and review Mpx components that run correctly on both original platforms and RN.
Core Features & Use Cases
- Cross-platform development constraints: Enforces template, script, style, JSON config, and conditional-compilation rules so .mpx components work on mini-programs, Web, and RN simultaneously.
- Capability references: On-demand reference docs covering RN support for template components, lifecycle/APIs, style properties, atomic CSS (UnoCSS), environment APIs, JSON config, and RN hybrid development.
- Compile validation script: Runs real compilation of .mpx files via @mpxjs/mpx-cli-service across targets (wx, ios, web, etc.) and categorizes errors by style/template/script/json/dependency.
- Use Case: When adapting an existing WeChat mini-program component to also ship on iOS/Android, follow the guided workflow to fix selectors, replace wx.xxx calls with mpx.xxx, isolate incompatible code with conditional compilation, then verify with the compile-validate script.
Quick Start
Ask the AI to adapt a specific .mpx component for React Native output and validate it with the compile-validate script targeting ios.