Registry / web-framework / mt-wxml-transpiler

mt-wxml-transpiler

JSON →
library0.0.4jsnpmunverified

A forked version of wxml-transpiler (v0.0.4) that converts WXML (WeChat Mini Program template language) into standard HTML/JSX or other formats. It is in early development with no clear release cadence. Differentiators: maintained fork of an otherwise stale upstream. Currently limited documentation; suitable for developers needing WXML transformation in Node.js with a simple spawn/exec interface.

npm install mt-wxml-transpiler
INSTALL
IMPORT
SIG · MT-WXML-TRANSPILER
M
mt-wxml-transpiler
web-frameworkjavascriptv0.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

transpile
✓ import { transpile } from 'mt-wxml-transpiler';
✗ const transpile = require('mt-wxml-transpiler');
Named export; CJS require will not work as expected because the package does not define a default export for CJS interop.
compile
✓ import { compile } from 'mt-wxml-transpiler';
✗ import compile from 'mt-wxml-transpiler';
Named export, not default.
parse
✓ import { parse } from 'mt-wxml-transpiler';
✗ const { parse } = require('mt-wxml-transpiler').default;
parse is a named export; no default export.

Transpile a simple WXML string to HTML using the `transpile` function with format option.

import { transpile } from 'mt-wxml-transpiler'; const inputWxml = `<view>Hello</view>`; const output = transpile(inputWxml, { format: 'html' }); console.log(output); // <div>Hello</div>
convert-wxml --version
Debug
Known issues
gotchaPackage is a fork with minimal changes; rely on original wxml-transpiler docs at your own risk.
fix
Refer to wxml-transpiler documentation for API details, but verify behavior with this package.
affects: >=0.0.0
deprecatedNo official support for WeChat Mini Program latest syntax (e.g., custom components, WXS).
fix
Consider using other tools like wepy or taro for full-featured conversion.
affects: 0.0.4
gotchaThe package uses CommonJS internally but expects ESM import; CJS require fails silently.
fix
Use `import` syntax as shown in imports.
affects: 0.0.4
Errors
Common errors & fixes
TypeError: Cannot read properties of undefined (reading 'replace')
Calling transpile without providing a string input.
fix
Ensure you pass a string: transpile('...')
Error: Unsupported format: jsx
Format option not supported. Only 'html' or 'wxml' are valid.
fix
Use format: 'html' or omit for default.
Upgrade
Version history
0.0.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
mt-wxml-transpiler — npm install mt-wxml-transpiler · libregistry