Improve document generate and deploy workflow #731
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODO
html context
插件可以提供额外 context。
关于部署
.umirc.js
里配置runtimePublicPath: true
,然后在 HTML 里输出window.publicPath = <%= YOUR PUBLIC_PATH %>;
dynamicImport: {}
,dynamicImport 有两个配置项,1) 是 loadingComponent,可以指定页面加载时的 loading 组件,2) 是 webpackChunkName,可以让打包后的文件名更有意义,而不是 1.async.js, 2.async.js 等exportStatic: {}
,exportStatic 有两个配置项,1) 是htmlSuffix
表示是否给路由加上.html
后缀,适用于有些服务器不会自动找index.html
的索引文件,2)是dynamicRoot
,这时需要把 html、css、js 等部署在一个地方,然后可以在任意路径打开冲突的配置项