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

webpack-bundle-syntax-check-plugin

v1.0.1

Published

一个简单的检测bundle是否兼容到指定ES版本的webpack插件

Readme

webpack-bundle-syntax-check-plugin

一个简单的检测 bundle 是否兼容到指定 ES 版本的 webpack 插件

背景

当我们在使用 babel 等编译工具时,为了加快编译速度,往往都会排除掉 node_modules,这样会跳过 node_modules 文件夹,加快编译速度。 但这样做的话,意味着我们完全信任第三方模块(一定转义成通用的 ES2015 版本),完全信任的结果有时候会比较糟糕,有一些知名的第三方依赖并未输出 ES2015 版本, 这样会导致有些机型不能识别 ES2016 及更高版本语法而报错,这个插件目的是在编译的过程中检测所有输出的 bundle,看 bundle 是否符合指定 ES 规范。 这样根据报错信息在 babel 配置忽略跳过对应规则的文件。

安装

npm install webpack-bundle-syntax-check-plugin --save-dev

使用

const { BundleSyntaxCheckerPlugin } = require("webpack-bundle-syntax-check-plugin");

module.exports = {
    plugins: [
        new BundleSyntaxCheckerPlugin({esVersion: 5}
    ]
}

说明

当检测到 bundle 有不符合对应 ES 规范时,会抛出对应错误和错误的行数,同时在根目录下将出错的源文件 bundle 输出到一个名为error-souce.js的文件。 根据抛出错误信息提示的错误行数找到具体错误位置排查即可