Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
react-app-rewire-antd-starter-config
Advanced tools
A config for using react-app-rewired v2+ with Antd, react-hot-loader, PostCSS and more
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
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?
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
yarn add -D react-app-rewire-antd-starter-config
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!
MIT
FAQs
A config for using react-app-rewired v2+ with Antd, react-hot-loader, PostCSS and more
The npm package react-app-rewire-antd-starter-config receives a total of 0 weekly downloads. As such, react-app-rewire-antd-starter-config popularity was classified as not popular.
We found that react-app-rewire-antd-starter-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.