最近在做VUE項(xiàng)目的時(shí)候,發(fā)現(xiàn)打包后部分靜態(tài)資源訪問不到,查找資料后找到解決方法
把history模式刪掉,就可以訪問到靜態(tài)資源 [history模式和hash模式]
](https://blog.csdn.net/qq_41772754/article/details/88773423?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-0&spm=1001.2101.3001.4242)
vue cli3取消了build文件夾,改用了vue.config.js配置文件來進(jìn)行配置,這個(gè)文件需要用戶自己在根目錄下創(chuàng)建
創(chuàng)建后,添加代碼
publicPath:"./"