https://github.com/1111mp/js-react-ssr-cli
react-ssr-cli
https://github.com/1111mp/js-react-ssr-cli
Last synced: 12 months ago
JSON representation
react-ssr-cli
- Host: GitHub
- URL: https://github.com/1111mp/js-react-ssr-cli
- Owner: 1111mp
- License: other
- Created: 2020-10-16T10:54:05.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-28T09:12:48.000Z (over 5 years ago)
- Last Synced: 2025-08-09T09:06:21.014Z (12 months ago)
- Language: JavaScript
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## js-react-ssr-cli
React 的服务端渲染脚手架
### 使用
首先:
```
npm install js-react-ssr-cli -g
or
yarn global add js-react-ssr-cli
```
然后创建项目:
```
react-ssr create app-name(你的项目名)
```
然后根据提示创建自己的初始化项目
启动开发环境:
```
npm run dev or yarn dev
```
启动生产环境:
```
npm run build && npm run start
or
yarn build && yarn start
```
关于 React 的 SSR:
已经实现项目 DOM、路由、store 和 css 同构,开发环境的热更新功能
支持选择 js 和 typescript,支持选择 MobX 和 Redux
默认的 css 预处理器为:stylus