module.exports = { publicPath: './', // 这个值被设置为空字符串 ('') 或是相对路径 ('./'),这样所有的资源都会被链接为相对路径,这样打出来的包可以被部署在任意路径。 devServer: { disableHostCheck: true // proxy: { // '^/': { //这里最好有一个 / // target: 'http://115.238.57.190:8010', // 服务器端接口地址 // ws: true, //如果要代理 websockets,配置这个参数 // // 如果是https接口,需要配置这个参数 // changeOrigin: true, //是否跨域 // pathRewrite: { // '^/api': '' // } // } // } } }