From 5ffbec0a33a49c698699646ab71ddb3ad1ea310c Mon Sep 17 00:00:00 2001 From: charles <981744753@qq.com> Date: 星期二, 21 五月 2024 17:10:03 +0800 Subject: [PATCH] fix:增加一个登录功能 --- vue.config.js | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 41 insertions(+), 4 deletions(-) diff --git a/vue.config.js b/vue.config.js index 910e297..2344871 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,4 +1,41 @@ -const { defineConfig } = require('@vue/cli-service') -module.exports = defineConfig({ - transpileDependencies: true -}) +const { defineConfig } = require('@vue/cli-service'); +const buildConfig ={outputDir:"dist", publicPath:"./", assetsDir:"static"}; +const path=require("path"); +const config={ + configureWebpack:{ + resolve: { + alias: { + '@': path.join(__dirname,'./src') + } + } + }, + transpileDependencies: true, + devServer:{ + host:"localhost", + open:true, + https: false, + hot:true, + client:{ + overlay: { + warnings:false, + errors:true + } + }, + proxy:{ + // "/api/base": { + // target: 'http://aps.fai365.com:9080', + // //娉細 鏆傛椂浣跨敤====鐢ㄦ埗鏉冮檺锛岃鑹叉殏鏃剁敤鐨勭幆澧� + // // target: "http://192.168.20.119:8011", + // changeOrigin: true, + // }, + [process.env.VUE_APP_BASE_API]:{ + target: process.env.VUE_APP_BASE_URL, + changeOrigin: true, + } + } + } +}; +if(process.env.NODE_ENV==='testing'||'production'){ + Object.assign(config,buildConfig); +} +module.exports = defineConfig(config); \ No newline at end of file -- Gitblit v1.8.0