国内使用 npm 速度很慢,你可以使用淘宝定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm:

 

$ npm install -g cnpm --registry=https://registry.npm.taobao.org
$ npm config set registry https://registry.npm.taobao.org


这样就可以使用 cnpm 命令来安装模块了
$ cnpm install [name]

使用 create-react-app 快速构建 React 开发环境

create-react-app 自动创建的项目是基于 Webpack + ES6

$ cnpm install -g create-react-app
$ create-react-app my_app
$ cd my_app/
$ npm start


在浏览器中打开 http://localhost:3000
 

 

相关文章:

  • 2021-04-12
  • 2021-05-20
  • 2022-02-13
  • 2021-05-27
  • 2021-11-16
  • 2022-02-08
  • 2022-02-16
  • 2022-12-23
猜你喜欢
  • 2021-10-22
  • 2021-09-23
  • 2021-09-01
  • 2021-07-06
  • 2021-04-29
  • 2021-09-10
  • 2021-10-05
相关资源
相似解决方案