@mcfed/cra
全局安装 `@mcf/cra`
Last updated 2 months ago by lixiang920531 .
ISC · Original npm · Tarball · package.json
$ cnpm install @mcfed/cra 
SYNC missed versions from official npm registry.

crat

全局安装 @mcf/cra

 npm install crat -g

全局安装 create-react-app

npm install create-react-app

运行crat

mcfcra

版本号说明

v0.2.0 新增渲染模版功能

v0.2.1

  • 修改模版默认路径,将其指定放到执行目录下的template文件夹中

  • 新增ssr功能

ssr用法

  1. package.json 中配置
{
    "scripts": {
        "ssr": "cross-env NODE_ENV=production mcfcra -s"
    },
    "ssrServerConfig": {
        "package": "app",        
        "buildPath": "dist"
    }
}
  1. package是包名,要求导出stroeApprouterConfig

  2. buildPath是构建目录会设置为静态目录加载资源

  3. 启动命令 yarn ssr 启动服务并监听3002端口

全局变量使用

  1. ssrServer Boolean 类型,启动服务初始化为 true
  2. ssrServerRoute String 类型, 当前的 SSR Server 服务的请求路由

Current Tags

  • 0.2.2-rc3                                ...           latest (18 days ago)

9 Versions

  • 0.2.2-rc3                                ...           18 days ago
  • 0.2.2-rc2                                ...           18 days ago
  • 0.2.2-rc1                                ...           a month ago
  • 0.2.1                                ...           2 months ago
  • 0.2.0                                ...           2 months ago
  • 0.1.4                                ...           2 months ago
  • 0.1.3                                ...           3 months ago
  • 0.1.2                                ...           3 months ago
  • 0.1.1                                ...           3 months ago
Downloads
Today 0
This Week 0
This Month 23
Last Day 1
Last Week 1
Last Month 61
Dependencies (16)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |