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
原文地址:https://www.cnblogs.com/ypwei/p/9759998.html
时间: 2024-11-05 11:50:24