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

mult-react-scripts

v0.1.1

Published

Customed configuration and scripts for Create React App.

Downloads

21

Readme

mult-react-scripts

自定义的react-scripts

若未安装create-react-app,先安装

npm install create-react-app -g

然后创建项目

create-react-app appname --scripts-version mult-react-scripts

使用示例见mult-react-scripts-example

主要差异

  1. 加入react-hot-loader3
    支持react组件的热更新

  2. 多入口
    兼容原项目结构,主要目的在于避免反复安装依赖,可以当做一个项目目录,而不是单应用 要使用多入口,需要在src和public目录下建相同的文件名项目,在启动时加入'-- app=appname'参数,示例如下:

  • npm start -- app=appname
  • npm run build -- app=appname
  • serve -s build/appname
  1. code-splitting(懒加载)
    使用lazy-load-react支持react组件的懒加载

  2. 第三方库按需分离
    需要在项目src下加入配置文件appconfig.js,参考示例配置

  3. 支持alias配置
    参考示例配置

详细差异与使用,请参考文章用create-react-app定制自己的react项目模板

一些问题

  1. 使用import()代码分离不支持chunk的重命名

  2. React Hot Loader 3 的使用及遗留问题

参考文章:

用create-react-app定制自己的react项目模板

react hot loader Migration to 3.0

react hot loader Known Limitations

React Hot Loader 3 beta 升级指南

webpack2 code-splitting-libraries

webpack2 Resolve

webpack2 Migrating from v1 to v2

This package includes scripts and configuration used by Create React App. Please refer to its documentation: