"devServer": { "port":3000, "proxy" : { "/api/*": { "target":"http://localhost:8080", "pathRewrite": {"^/api" : ""}, } } } 我这样写能行。
问题解决了。重新换了一下文件。。