123456789101112131415161718192021222324252627282930313233343536 |
- const path = require("path");
- // const name = "教室预约";
- // function resolve(dir) {
- // return path.join(__dirname, dir);
- // }
- module.exports = {
- // 配置路径别名
- configureWebpack: {
- // resolve: {
- // alias: {
- // "ss": resolve("pages/mine/mine"),
- // },
-
- // },
- //代理
- devServer: {
- "port": 8080,
- // 调试时允许内网穿透,让外网的人访问到本地调试的H5页面
- disableHostCheck: true,
- "proxy": {
- "/api": {
- // "target": "https://mentor.site.ximengnaikang.com", // 需要跨域的域名
- // "target":'http://77ff-1-198-30-100.ngrok.io',
- "target": "https://api.qunali.site.xmnk.cn/api", // 需要跨域的域名
- "changeOrigin": true,
- "secure": false,
- "pathRewrite": {
- "^/api": "" //匹配请求路径里面有 /api 替换成 https://www.xxx.cn
- }
- }
- }
- },
- //productionSourceMap: false,
- },
- }
|