用ip代替localhost
npm install ip -D
const ip = require('ip') devServer: { port: 8082, host: ip.address(), // host: 'localhost', proxy: { '/api': { target: 'https://test.com', } }, },
npm install ip -D
const ip = require('ip') devServer: { port: 8082, host: ip.address(), // host: 'localhost', proxy: { '/api': { target: 'https://test.com', } }, },