exportStatic

  • Type: object

配置 html 的输出形式,默认只输出 index.html

如果开启 exportStatic,则会针对每个路由输出 html 文件。

包含两个子属性,

  • htmlSuffix,启用 .html 后缀。
  • dynamicRoot,部署到任意路径。

比如以下路由,

  1. /
  2. /users
  3. /list

不开启 exportStatic 时,输出,

  1. - index.html

设置 exportStatic: {} 后,输出,

  1. - index.html
  2. - users/index.html
  3. - list/index.html

设置 exportStatic: { htmlSuffix: true } 后,输出,

  1. - index.html
  2. - users.html
  3. - list.html