1:npm install -g create-react-app 

2:创建一个应用 

  1. create-react-app my-app  
  2. cd my-app 

3:提取配置文件

npm run eject

4:允许文件

  npm start

create-react-app 默认是创建单页面应用,但是也可以创建多页面应用,需要手动配置一下webpack

第一步:

create-react-app 创建react项目 多页面应用

第二步:

入口文件修改

create-react-app 创建react项目 多页面应用

create-react-app 创建react项目 多页面应用

 

create-react-app 创建react项目 多页面应用

 

相关文章:

  • 2021-11-04
  • 2021-08-13
  • 2022-12-23
  • 2021-04-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-19
  • 2022-12-23
  • 2021-07-04
  • 2022-02-27
  • 2021-07-18
  • 2021-12-19
  • 2021-11-30
相关资源
相似解决方案