首页 > 其他分享 >vue项目打包后运行index.html,会报错"because its MIME type...

vue项目打包后运行index.html,会报错"because its MIME type...

时间:2022-10-06 07:22:06浏览次数:48  
标签:index vue because html MIME 报错 type

打包后运行index.html,会报错"because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."

1.找到config文件夹下的index.js文件,将build下的assetsPublicPath:"/"设置成assetsPublicPath:"./",

2.找到build文件夹 -> utils.js,在里面将加入一句publicPath: '../../'

标签:index,vue,because,html,MIME,报错,type
From: https://www.cnblogs.com/mahmud/p/16756957.html

相关文章