const webpack = require('webpack') module.exports = { devServer: { disableHostCheck: true }, css: { loaderOptions: { less: { modifyVars: { 'font-size-base': '12px', }, javascriptEnabled: true, }, }, }, configureWebpack: { plugins: [ new webpack.ProvidePlugin({ 'window.Quill': 'quill/dist/quill.js', 'Quill': 'quill/dist/quill.js', }), ], }, publicPath: './', devServer: { proxy: { '/api': { //这里最好有一个 / target: 'http://localhost:8089/123/ub1sjwdz1vo2.html', // 后台接口域名 ws: false, //如果要代理 websockets,配置这个参数 secure: false, // 如果是https接口,需要配置这个参数 changeOrigin: true, //是否跨域 pathRewrite: { '^/api': '' } }, '/api2': { //这里最好有一个 / target: 'http://localhost:8089/123/g3gbh1bk3.html', // 后台接口域名 ws: false, //如果要代理 websockets,配置这个参数 secure: false, // 如果是https接口,需要配置这个参数 changeOrigin: true, //是否跨域 pathRewrite: { '^/api2': '' } }, } } };