new WebpackDevServer(webpack(config), {
hot:hot,
inline: true,
compress: true,
//去掉真实ip的检测
disableHostCheck: true,
stats: {
chunks: false,
children: false,
colors: true
},
historyApiFallback: true,
proxy: {
'/api/**/*': {//接口开头关键字 *表示全部
target: 'http://ip地址',
//host: localPublicPath,
changeOrigin: true,
secure: false
}
}
}) 就okle