vue項(xiàng)目 打包錯(cuò)誤
Refused to apply style from 'http://localhost:1291/css/app.cb7fc8a9.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

image.png
解決方案參考
配置相對(duì)路徑
module.exports = {
// 基本路徑
publicPath:"./", // 可以設(shè)置成相對(duì)路徑,這樣所有的資源都會(huì)被鏈接為相對(duì)路徑,打出來的包可以被部署在任意路徑
outputDir:"dist", //打包時(shí)生成的生產(chǎn)環(huán)境構(gòu)建文件的目錄
assetsDir: 'public', // 放置生成的靜態(tài)資源 (js、css、img、fonts) 的 (相對(duì)于 outputDir 的) 目錄
/*devServer: {
proxy: 'http://localhost:8080'
}*/
}

image.png
總結(jié):
感謝 打包路徑是絕對(duì)路徑,改了之后只有tabbar顯示,后來百度了下說讓路由改成hash模式,成了 ,不知道為啥history 不行

image.png