使用Vue-cli3.x開發環境中(router采用 history模式)出現Failed to resolve async component default: Error: Loading chunk {/d} failed.或者Uncaught SyntaxError: Unexpected token <錯誤
錯誤截圖
解決方案
修改webpack的配置,
在vue.config.js文件中修改publicPath為'/'即解決問題
module.exports = {
publicPath: '/', // <----這里就是會修改webpack的outPath.publicPath
}