{"id":25964,"library":"mt-wxml-transpiler","title":"MT WXML Transpiler","description":"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.","status":"active","version":"0.0.4","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install mt-wxml-transpiler","lang":"bash","label":"npm"},{"cmd":"yarn add mt-wxml-transpiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add mt-wxml-transpiler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Named export; CJS require will not work as expected because the package does not define a default export for CJS interop.","wrong":"const transpile = require('mt-wxml-transpiler');","symbol":"transpile","correct":"import { transpile } from 'mt-wxml-transpiler';"},{"note":"Named export, not default.","wrong":"import compile from 'mt-wxml-transpiler';","symbol":"compile","correct":"import { compile } from 'mt-wxml-transpiler';"},{"note":"parse is a named export; no default export.","wrong":"const { parse } = require('mt-wxml-transpiler').default;","symbol":"parse","correct":"import { parse } from 'mt-wxml-transpiler';"}],"quickstart":{"code":"import { transpile } from 'mt-wxml-transpiler';\n\nconst inputWxml = `<view>Hello</view>`;\nconst output = transpile(inputWxml, {\n  format: 'html'\n});\nconsole.log(output); // <div>Hello</div>","lang":"typescript","description":"Transpile a simple WXML string to HTML using the `transpile` function with format option."},"warnings":[{"fix":"Refer to wxml-transpiler documentation for API details, but verify behavior with this package.","message":"Package is a fork with minimal changes; rely on original wxml-transpiler docs at your own risk.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider using other tools like wepy or taro for full-featured conversion.","message":"No official support for WeChat Mini Program latest syntax (e.g., custom components, WXS).","severity":"deprecated","affected_versions":"0.0.4"},{"fix":"Use `import` syntax as shown in imports.","message":"The package uses CommonJS internally but expects ESM import; CJS require fails silently.","severity":"gotcha","affected_versions":"0.0.4"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure you pass a string: transpile('...')","cause":"Calling transpile without providing a string input.","error":"TypeError: Cannot read properties of undefined (reading 'replace')"},{"fix":"Use format: 'html' or omit for default.","cause":"Format option not supported. Only 'html' or 'wxml' are valid.","error":"Error: Unsupported format: jsx"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}