在程序入口的最上方添加 __webpack_public_path__ = path; //your path//your app start here 转载于:https://www.cnblogs.com/DarkMaster/p/6847068.html