0.1.3 • Published 2 years ago

cra-template-react-boat v0.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

cra-template-react-boat

基于vite构建的react + mobox + typescript 脚手架

create react app

To use this template with Create React App, add --template react-boat when creating a new app. For example:

npx create-react-app my-app --template react-boat

yarn create react-app my-app --template react-boat

react-boat

从零开始搭 vite + reactjs 项目,,并通过 Actions 自动构建,发布

vite + reactjs + typescript + mobx + eslint + json-server

全新vite3.0体验

react-router 6.0

useRouters构造路由

React.Suspense + React.lazy做异步加载

通过import做异步加载

const Home = lazy(() => import('@/page/home'))

json-server

json-server做mock请求,接口定义符合RESTful API 规范

concurrently

concurrently同时启动前端、后端2个服务

命令介绍

  1. yarn mock

本地开发,启动mock请求

  1. yarn build

构建生产环境

  1. yarn server

构建后,用dist目录的静态资源启动服务,并开启mock

  1. yarn json-server

开启json-server,模拟数据接口

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.1.3

2 years ago

0.0.7

2 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago