- 自定义webpack config customize-cra, react-app-rewired
- 适配 postcss-pxtorem
- UI库 antd design mobile
Create a custom definition file called react-router-dom.d.ts and add the following:
export * from "@types/react-router";
export { RouteComponentProps } from "react-router";
declare module "react-router-dom" {
export function withRouter<T extends RouteComponentProps<any>>(
component?: React.ComponentType<T>
): any;
}