
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
wx-code-minifier
Advanced tools
小程序代码压缩工具(代码压缩率为25%~30%),推荐配合[mp-parser](https://www.npmjs.com/package/mp-parser)预处理工具使用
小程序代码压缩工具(代码压缩率为25%~30%),推荐配合mp-parser预处理工具使用
# 第一步 安装wx-code-minifier
npm install -g wx-code-minifier
# 第二步 在项目目录下运行
wx-code-minifier
# 指定压缩路径,会压缩 [src] 下所有的wxml、wxss和js文件
# 如 wx-code-minifier --src ./
wx-code-minifier --src [src]
默认配置如下,如有需求可以通过修改项目下的 wxmin.config.js 来进行覆盖。
module.exports = {
// 源代码目录
src: 'dist',
wxjsMin: true, // 是否压缩wxjs代码
wxssMin: true, // 是否压缩wxss代码
wxmlMin: true, // 是否压缩wxml代码
wxjsMinConfig: { // wxjs压缩配置项
mangle: {
toplevel: true, // 代码混淆
},
compress: {
dead_code: true, // 移除没被引用的代码
conditionals: true, // 优化if条件判断
warnings: true, // 显示警告
drop_console: true, // 删除所有console
passes: 2 // 压缩次数
}
}
}
FAQs
小程序代码压缩工具(代码压缩率为25%~30%),推荐配合[mp-parser](https://www.npmjs.com/package/mp-parser)预处理工具使用
We found that wx-code-minifier 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.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.