
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
wxml-minify
Advanced tools
压缩wxml,减小程序包大小。微信开发者工具只压缩了js, json, css, 实际wxml也可以进行压缩来减小包大小。
$ yarn add wxml-minify -D
const minify = require('wxml-minify');
minify(`
<view class="{{a ? 'b' : 'c'}}">
<!-- comment -->
<view wx:if="{{a && b}}">hello</view>
<view wx:else">world</view>
<image class="d" id="e" lazy-load />
</view>
`)
// <view class="{{a?'b':'c'}}"><view wx:if="{{a&&b}}">hello</view>
// <view wx:else">world</view>
// <image class="d"id="e" lazy-load/></view>
目前通过以下途径压缩,压缩率20%以上:
/>结尾true的使用简写形式 <image lazy-load/>5和6可以使用prettier插件prettier-plugin-auto-close-empty-tag和prettier-plugin-format-true-value-attribute)进行规范
FAQs
miniprogram wxml minify
We found that wxml-minify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.