報錯如下:
Refused to apply style from 'http://127.0.0.1:5500/css/chunk-43aa77e1.33bcbef1.css' because its MIME type ('text/html') is
not a supported stylesheet MIME type, and strict MIME checking is enabled.Failed to load resource: the server responded
with a status of 404 (Not Found)
此塊代碼意思為:
拒絕應用’http://127.0.0.1:5500/css/chunk-43aa77e1.33bcbef1.css’,因為它的MIME型別(‘text/html’)不是受支持的樣式表MIME型別,并且需要嚴格的MIME檢查已啟用,失敗加載資源:服務器的回應狀態為404(未找到)
Failed to load resource: the server responded with a status of 404 (Not Found)
此塊代碼意思為:
未能加載資源:服務器回應狀態為404(未找到)
引起此類報錯的原因是因為js、css等檔案過多,需手動添加(./)獲取當前檔案路徑,但js等檔案過多手動添加路徑會引起沖突,
此類報錯的解決方案為:在根目錄中添加一個名為vue.config.js的檔案,操作如下


轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/271398.html
標籤:其他
