Template compiler for mpregular, converting Regular.js templates into mini-program (WeChat/Alipay) compatible code. Version 0.1.5, with low release cadence and limited community adoption. Key differentiator: bridges Regular.js components to mini-program environments, unlike other tools that target Vue or React.
npm install mpregular-template-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compiles a simple Regular.js template to WeChat mini-program code using the compile function.
Always pass an options object with 'type' and 'mode' explicitly.
Access result.code instead of treating result as a string.
Use type: 'wechat' instead of 'wx'.
Check the documentation for supported platforms; for others, consider alternative compilers.
Run 'npm install mpregular-template-compiler' and ensure using a bundler that supports ESM.
Use 'import { compile } from ...' instead of 'import compile from ...'.Access result.code after compile returns an object.