- 类型:
hd
- 类型:
Boolean
- 默认值:
false
如果设为true
,则开启高清方案。
disableServiceWorker
- 类型:
Boolean
- 默认值:
false
如果设为true
,则禁用 service worker 。
- 类型:
Boolean
- 默认值:
如果设为true
,则切换 react 到 preact 。
注意兼容性
umi 框架本身是兼容 preact 的,但需注意项目代码和引入依赖库的兼容问题,比如 antd 是不兼容 preact 的。
loading
- 类型:
String
- 默认值:
null
指定页面切换时的 loading 效果组件,值为相对于项目根目录的文件路径。
export default {
loading: './PageLoadingComponent',
WARNING
只在 build 后有效。
hashHistory
- 类型:
Boolean
- 默认值:
false
如果设为 ,切换 history 方式为 hash(默认是 browser history)。
- 类型:
Boolean
src/layout/index.js
- src/page
- model(如果有开启 umi-plugin-dva 插件的话)
disableDynamicImport
- 类型:
Boolean
- 默认值:
false
如果设为true
,禁用 Code Splitting,打包后只输出 umi.css 和 umi.js。
WARNING
disableFastClick
- 类型:
Boolean