veu npm run dev指定host

通常,我们可以在vue项目中的config/index.js指定host,,如下(解host的注释)

 但是,在接手的目前项目中,解注释host后,npm run dev并有变为

http://192.168.43.230:8087,依然是http://localhost:8087

经过一番查找,发现要在build/dev-server.js文件中配置,如下。

好记性不如烂笔头,每天记录一点点
原文地址:https://www.cnblogs.com/wayneliu007/p/11495212.html