npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wxapp-pack

v1.0.4

Published

微信小程序打包工具

Readme

wxapp-pack

一个使用文件依赖分析的小程序打包工具

环境要求

NodeJs要求 v8.3.0 以上

下载安装

npm install -g wxapp-pack

特性

  • 文件依赖分析
  • 未使用文件分析
  • 文件依赖图绘制
  • 代码压缩

命令行用法

build

$ wxapp-pack b
$ wxapp-pack build

blockchain

analyse

$ wxapp-pack a
$ wxapp-pack analyse

$ wxapp-pack analyse -n (不绘制文件依赖图)
$ wxapp-pack analyse --nograph

blockchain blockchain

config

$ wxapp-pack c
$ wxapp-pack config

blockchain

配置项

使用.wxapp-pack.json文件来存储配置项

before

编译前需要额外执行的命令

output

编译结果输出目录

analyse

分析文件输出目录

imageExtList

允许复制的图片后缀列表

terserConfig

js压缩配置,具体配置项见https://github.com/terser/terser

babelGeneratorConfig

wxs压缩配置,具体配置项见https://babeljs.io/docs/en/babel-generator

analyseWhiteList

未使用文件白名单

invalidFileWhitelist

无效文件白名单

showUpdateTips

是否允许提示更新信息

其他

wxapp-pack不支持什么?

  • 不支持动态import,例如:import('a.js').then();
  • require和import不支持模板语法,例如:require(`./lib${1}.js`);
  • 不支持js文件使用绝对路径引用,因为小程序不支持

wxapp-pack如果压缩代码?

js

使用terser进行压缩,默认压缩配置如下:

{
    "mangle": false,
    "compress": false
}

json

不进行任何压缩

wxml

仅使用decomment进行注释移除(不会移除内嵌wxs中的注释)

wxs

使用@babel/generator进行压缩,默认压缩配置如下:

{
    "comments": false
}

wxss

仅使用postcss进行注释移除

image

不进行任何压缩