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