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

hotpack

v0.13.4

Published

Hotpack is a web packer. The biggest advantage is file-level caching, which is very fast. If it is not the first run, no matter how big the project is, it is at the "millisecond" level.

Downloads

6

Readme

Hotpack

Hotpack is a web packer. The biggest advantage is file-level caching, which is very fast. If it is not the first run, no matter how big the project is, it is at the "millisecond" level.

中文

Feature

  1. Each built file will be cached separately and can be reused at any time.
  2. Support single page, multi-page, server-side rendering (isomorphic)
  3. The development environment does not destroy the directory structure

Install

Environmental requirements Node 14 or above

It is recommended to install globally

npm install -g hotpack

Common commands

All commands need to be in the root directory of the project to run,usually the directory where the src directory is located

#Start the development build,The default command of hotpack is dev, it can also be written as hotpack
hotpack dev

#use 3001 port
hotpack dev -p 3001

#no server
hotpack dev -s

#start publishing build
hotpack pro

#start server 
hotpack pro -s

#clear dev cache
hotpack dev -c

#clear pro cache
hotpack pro -c

more cmd see help

hotpack dev -h
hotpack  pro -h

Configuration file

The configuration files is placed in the .hotpack folder in the root directory. There are three files.

  1. base.js Common configuration
  2. dev.js Development configuration
  3. pro.js production configuration

dev.js, pro.js will overwrite the same configuration of base.js

configuration details

Import resources

hotpack project requires writing in ES6 module syntax.

In addition to the normal import syntax, hotpack also has some extensions to the import syntax.

  1. starts with '/' is the absolute path, the absolute path is the absolute path relative to the src directory
import { time } from '/js/util.js'
  1. import picture
import loading from './image/loading.png'
  1. import css
import './index.css'
  1. Template physical path => web path
import ‘./index.html=>site/index.html’

Fortunately ,you can write this in any javascript file

  1. Resources at the same level can omit ./
// equal to  import ‘./index.css’  
import ‘index.css’  
body{background:url(bg.png)}
  1. Path completion in this example, first complete ./time.js If the file does not exist, complete ./time/index.js
import time from './time'
  1. import node modules Just write the module name directly
import  Swiper from  'swiper'
  1. import css in node modules
import 'swiper/swiper-bundle.css'

Use node modules

Note: The node module in the root directory packae.json dependences will be processed by the node plugin. If it is only a server-side module, please put it in devDependences.

node plugin will try to find the files that the browser can use. If it can't be found, it needs to be configured manually.

configuration details

Plugins

If you write a plug-in that can meet all needs, the plug-in becomes more and more complex and larger. Therefore, it is recommended to put the plug-in under the personal namespace to realize the functions you need.

If the function you need does not have a ready-made plug-in, you can develop one yourself.

plugin

more detail

Quick experience

The fastest way is to clone the template project directly, so that you can start directly without any configuration. Currently there is only one template to choose from, which is the generic vue3 template

git clone https://github.com/duhongwei/hotpack-tpl-vue3.git  my-mpp
cd my-app/main
npm install 

more detail

About cache

The hotpack cache is very powerful, but occasionally it may cause problems. As long as the cache is cleared, there is generally no problem.