一、问题
执行yarn build之后访问dist文件夹中的index.html文件为空白
二、解决方法
找到config文件夹中的config.ts文件

添加代码
history: {
type: 'hash'
},
publicPath: './',

修改完重新build一下就好了

文章讲述了在使用Yarn构建项目时遇到的index.html空白问题,通过编辑config.ts并配置history和publicPath来修复。
一、问题
执行yarn build之后访问dist文件夹中的index.html文件为空白
二、解决方法
找到config文件夹中的config.ts文件

添加代码
history: {
type: 'hash'
},
publicPath: './',

修改完重新build一下就好了
