exportStatic
- Type:
object
配置 html 的输出形式,默认只输出 index.html
。
如果开启 exportStatic
,则会针对每个路由输出 html 文件。
包含两个子属性,
- htmlSuffix,启用
.html
后缀。 - dynamicRoot,部署到任意路径。
比如以下路由,
/
/users
/list
不开启 exportStatic
时,输出,
- index.html
设置 exportStatic: {}
后,输出,
- index.html
- users/index.html
- list/index.html
设置 exportStatic: { htmlSuffix: true }
后,输出,
- index.html
- users.html
- list.html