WeChat Mini Program code minifier that compresses WXML, WXSS, and JS files with a reported compression ratio of 25-30%. Current version 1.0.4 is stable with no recent updates. It provides configurable options for JS minification (using terser-like settings), CSS minification, and HTML template compression. Differentiates from other minifiers by targeting WeChat-specific file formats and integrating with mp-parser for preprocessing. The tool is CLI-based and can be used globally via npm. It does not support ESM imports and relies on a CommonJS config file.
npm install wx-code-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs the minifier globally and runs it on the dist directory of a WeChat Mini Program project.
Use the command line directly. If you need programmatic control, consider other minifiers like terser or clean-css.
If your project uses 'type': 'module', rename wxmin.config.js to wxmin.config.cjs or use dynamic import.
Test on your Node.js version. Consider alternatives like miniprogram-ci which includes built-in minification.
Run 'npm install -g wx-code-minifier' and ensure global npm bin directory is in your PATH.
Use 'module.exports = { ... }' in wxmin.config.js instead of 'export default'.No dependency data recorded yet.