一个 carlo + react 的模板,现已经支持热加载。
- carlo:
0.9.43
- react:
16.8.3
yarn install # 安装依赖
yarn dev:render [--re-dll] # 开启热加载, re-dll: rebuild dll
yarn build:render [--re-dll] [--dev] # build code. re-dll: rebuild dll, dev: dev config
yarn start # 启动electron
如果修改了dll内容的话记得在执行时带上--re-dll
打包 npx pkg -t macos .
- 添加ui库
- 添加state库
- 添加router库
- 添加dll
- 使用react.lazy特性,动态加载
- 用node脚本代替shell