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

react-app-rewire-antd-starter-config

v1.0.0

Published

A config for using react-app-rewired v2+ with Antd, react-hot-loader, PostCSS and more

Downloads

6

Readme

react-app-rewire-antd-starter-config

An override-config for using react-app-rewired 2.0+ with Antd, react-hot-loader, PostCSS and more

基于 react-app-rewired 2.0+ 的 antd 项目初始化配置

⚠️ This config can NOT fit the version of create-react-app lower than 2.0

Motivation

After rewiring a create-react-app project, we have to ovrride much config to meet our customized needs. Painfully, the same work is repeated every time when you initialize a rewired project. Thus, why not importing a ready-to-go config directly?

Features

  • support react-hot-loader
  • support CSS Modules(enable CSS modules without any special extension)
  • support all features of postcss-preset-env(stage: 0)
  • add support for Antd and Lodash to import components on demand by default
  • add support for using .eslintrc.json file to customize eslint by default
  • add support for using '@' as root directory by default

Preparation

1 ) Install create-react-app 2.x / 3.x

2 ) Install react-app-rewired 2.x

3 ) Install react-app-rewire-hot-loader

yarn add -D react-app-rewire-hot-loader

# If you don't already, you also need
yarn add react-hot-laoder

Install

yarn add -D react-app-rewire-antd-starter-config

Usage

In the config-overrides.js of the root of your project you created for react-app-rewired add this code:

const rewireDefaultConfig = require('react-app-rewire-antd-starter-config')

module.exports = (config, env) => {
  // ...other rewires
  return rewireDefaultConfig(config, env)
}

E.g.

// CSS modules without extension
import * as styles from './example.css'

// import on demand
import { Button, Table } from 'antd'
import { cloneDeep, pickBy } from 'lodash'
// use '@' as root directory
import Example from '@/Components/Example'

const TestComponent = () => (
  <div>
    <span className={styles.title}>Title</span>
    /* ... */
  </div>
)

Enjoy coding!

LICENSE

MIT