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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-whole-barrels

v1.0.0

Published

- [x] Es6/7 - [x] react/react-router/dva - [x] less - [x] dev-server - [x] 模块热替换(HMR) - [x] sourcemap - [x] CSS代码分割 - [x] 代码分割(SplitChunksPlugin) - [x] 浏览器缓存 - [x] tree shaking - [x] DellPlugin - [x] PWA - [x] eslint - [x] stylelint

Downloads

8

Readme

功能实现

  • [x] Es6/7
  • [x] react/react-router/dva
  • [x] less
  • [x] dev-server
  • [x] 模块热替换(HMR)
  • [x] sourcemap
  • [x] CSS代码分割
  • [x] 代码分割(SplitChunksPlugin)
  • [x] 浏览器缓存
  • [x] tree shaking
  • [x] DellPlugin
  • [x] PWA
  • [x] eslint
  • [x] stylelint

快速开始

git clone [email protected]:LuoShengMen/React-Whole-barrels.git
npm install  // 依赖包安装
npm run dll   // dllplugin进行打包
npm run start // 开发模式启动项目
npm run build // 生产环境项目打包
npm run dev-build // 开发环境打包

其他配置

git checkout TS-React // 切换到ts配置
git checkout Multiplt-Page        // 切换到多页面配置

原仓库地址

https://github.com/Rashomon511/React-Whole-barrels.git

details

  • PWA的实现使用了workbox-webpack-plugin插件,该插件在生产模式下运行,不能进行用户自定义sw.js文件,必须通过更改插件的相关配置实现;另一种方案是开启https服务,使用serviceworker-webpack-plugin,该插件可以自定义sw.js(配置该文件的路径即可),使用service work服务都需要在脚本中进行注册。
  • 提取css文件的两种方式:一种是使用extract-text-webpack-plugin,一种是使用mini-css-extract-plugin
  • 生成html模板实现资源自动引入的方式:web-webpack-plugin;html-webpack-plugin,可以零配置,也可以指定进行配置。两类插件都会获取css的提取文件,在默认情况下放置在link中。
  • 使用cdn加速设置publicPath时,由于插件的使用不同,在配置css的publicPath会有所不同,比如web-webpack-plugin可以配置路径,mini-css-extract-plugin可以配置路径,;html-webpack-plugin不能配置路径。