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

vite-css-preload-plugin

v1.3.1

Published

a vite plugin for css preload

Downloads

2

Readme

1、这是一个给 vite 用的 css 预加载插件。

2、它的原理是在你打包完之后,去读取你产物的 html 文件里的 css link,然后生成对应的 preload link 来实现进准预加载。

3、由于 vite 会自己在 html 里注入一些 css link。所以在实现 css 预加载的时候,有些人是把所以 css 都预加载了,以便于解决 hash 出现在 css 文件的名字里,导致预加载了一些首屏用不到的 css。这个插件优化了这个问题。

4、目前支持 vite>=4 , node>=16.20.2;

5、如果您的环境支持 node>=18.20,建议使用 1.1.2 版本。


1、This is a CSS preloading plugin designed for Vite.

2、Its principle is to read the CSS links from the HTML files of your build after the packaging process and generate the corresponding preload links for preloading them in advance.

3、Since Vite automatically injects some CSS links into the HTML, some people preload all CSS to solve the problem of hashes appearing in CSS filenames, which could lead to preloading unnecessary CSS files that aren't used on the first screen. This plugin optimizes that issue.

4、only support : vite>=4 , node>=16.20.2;

5、If your env support node>=18.20,i wish you can use v1.1.2

// eg:  使用案例:
import preloadCss from "vite-css-preload-plugin";

export default defineConfig({ plugins: [preloadCss()] });