123456789101112131415161718192021222324252627282930 |
- const { defineConfig } = require("@vue/cli-service");
- module.exports = defineConfig({
- transpileDependencies: true,
- lintOnSave: false,
- pluginOptions: {
- electronBuilder: {
- externals: [],
- },
- },
- devServer: {
- open: false, // 编译完成是否打开网页
- host: "0.0.0.0", // 指定使用地址,默认localhost,0.0.0.0代表可以被外界访问
- port: 8080, // 访问端口
- https: false, // 编译失败时刷新页面
- hot: true, // 开启热加载
- proxy: {
- "/devApi": {
- // target: "http://ty.mxnzp.com/online_tools_api/",
- target: "http://127.0.0.1:8050/",
- // target: "http://tcl.mxnzp.com/tcl-translate/",
- // target: "https://www.cretinzp.com/jokes-web-manager/", //API服务器的地址
- changeOrigin: true,
- pathRewrite: {
- "^/devApi": "",
- },
- },
- }, // 设置代理
- },
- });
|