Uncaught SyntaxError: Unexpected token < Uncaught (in promise) Error: Couldn't resolve component "default" at "/user/userinfo


使用Vue-cli3.x開發環境中(router采用 history模式)出現Uncaught SyntaxError: Unexpected token <錯誤

解決方法:

修改webpack的配置,
在vue.config.js文件中修改publicPath為'/'即解決問題


module.exports = {
    publicPath: '/'
}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM