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

cursor-pointer-loader

v1.0.2

Published

一个通过html标签属性快速添加指针移入效果的webpack加载器(A loader that quickly adds cursor pointer effects via html tag attributes)

Readme

cursor-pointer-loader

一个通过html标签属性快速添加指针移入效果的webpack加载器,代替繁琐的增加css,特别是一些没有其他样式的场景(A loader that quickly adds cursor pointer effects via html tag attributes)

安装 (Installation)

npm install cursor-pointer-loader

重要: 此包需要以下peer dependencies,请确保你的项目中已安装:

npm install @babel/core @babel/parser @babel/traverse @babel/generator

使用示例 (Usage Examples)

基本用法

<div __cursorPointer>this is example , __cursorPointer attributes</div>

// 转换后:
<div style={{cursor: "pointer"}}>this is example , __cursorPointer attributes</div>

与现有样式合并

<button style={{backgroundColor: 'blue'}} __cursorPointer>Click me</button>

// 转换后:
<button style={{backgroundColor: 'blue', cursor: "pointer"}}>Click me</button>

TypeScript 支持

如果你使用 TypeScript,需要添加类型声明(React 示例):

declare module 'react' {
  interface HTMLAttributes<T> extends DOMAttributes<T> {
    __cursorPointer?: boolean
  }
}

Webpack 配置

在你的 webpack.config.js 中添加:

module.exports = {
  module: {
    rules: [
      {
        test: /\.(js|jsx|ts|tsx)$/,
        use: ['cursor-pointer-loader'],
        exclude: /node_modules/
      }
    ]
  }
};

版本变更 (Changelog)

v1.0.2

  • ✨ 代码打包优化,减少包体积
  • ✨ 支持 CommonJS 和 ES 模块双格式输出
  • ✨ 将 Babel 依赖改为 peerDependencies,避免版本冲突
  • ✨ 添加代码压缩和优化

afterwards you can happy coding! 🎉