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 🙏

© 2025 – Pkg Stats / Ryan Hefner

curiosity-bundler

v0.2.5

Published

Unique webpack wrapper for curiosity.

Readme

curiosity-bundler

Bundler是一个基于Webpack5的封装工具。它简化了Webpack配置的复杂性,提供了一种更简洁、更直观的方式来打包应用程序。Bundler不仅继承了Webpack的强大功能,如模块热替换和代码分割,还提供了一些额外的工具和设置来优化开发体验和生产效率。

使用

安装

npm i curiosity-bundler -D

项目根目录新建bundler.config.ts

iimport path from 'path'
import { Config } from 'curiosity-bundler'

const config: Config = {
    entry: {
      index: path.join(__dirname, 'src/index.js'),
    },
    html: {
      index: {
        template: path.join(__dirname, 'index.html')
      }
    },
    alias: {
      '@': path.resolve(__dirname, 'src'),
    },
    configWebpack(config) {
      // webpack config
    },
}

export default config

配置说明

  • mode:Webpack的模式设置,可选值为developmentproductionnone
  • context:Webpack的上下文路径
  • entry:Webpack的入口文件
  • html:HtmlWebpackPlugin的选项
  • alias:模块别名,用于Webpack解析
  • externals:外部扩展,这些模块不会被打包到bundle中
  • publicPath:公共URL路径
  • dest:输出目录
  • configWebpack:用户自定义Webpack配置函数
  • extraTranspileIncludes:额外的转译包含路径
  • tsConfigFile:TypeScript配置文件路径
  • hash:是否启用hash
  • minify:是否压缩
  • devServer:开发服务器的配置
  • cssLoaderOptions:CSS加载器选项
  • cssModulesExcludes:CSS模块排除选项
  • lessLoaderOptions:Less加载器选项
  • autoprefixer:自动添加浏览器前缀选项
  • extraPostCSSPlugins:额外的PostCSS插件
  • devtool:Webpack devtool选项
  • analyzer:是否启用包分析器
  • extraPlugins:额外的Webpack插件
  • extarRules:额外的Webpack规则