| | |
| | | /* |
| | | * @Date: 2024-03-23 09:49:06 |
| | | * @LastEditors: gaoshp |
| | | * @LastEditTime: 2024-03-23 18:21:49 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-11-27 14:59:26 |
| | | * @FilePath: /cps-web/vue.config.js |
| | | */ |
| | | const { defineConfig } = require('@vue/cli-service') |
| | | |
| | | module.exports = defineConfig({ |
| | | lintOnSave: false, |
| | | //设置为空打包后不分更目录还是多级目录 |
| | | publicPath:'', |
| | | publicPath: '', |
| | | //build编译后存放静态文件的目录 |
| | | //assetsDir: "static", |
| | | |
| | |
| | | |
| | | //开发服务,build后的生产模式还需nginx代理 |
| | | devServer: { |
| | | allowedHosts: 'all', |
| | | allowedHosts: 'all', |
| | | open: false, //运行后自动打开浏览器 |
| | | port: process.env.VUE_APP_PORT, //挂载端口 |
| | | proxy: { |
| | | '/api': { |
| | | target: process.env.VUE_APP_API_BASEURL, |
| | | ws: true, |
| | | '/api/smart-collect': { |
| | | target: 'http://120.46.212.231:5102', |
| | | // ws: true, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/api': '/' |
| | | } |
| | | }, |
| | | '/myapi': { |
| | | target: process.env.VUE_APP_API_MYBASEURL, |
| | | '/workinghour': { |
| | | target: 'http://120.46.212.231:5102', |
| | | // ws: true, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/api': '/' |
| | | } |
| | | }, |
| | | '/api/smis/workstation/saveDatapoints': { |
| | | target: 'http://120.46.212.231:5102', |
| | | // ws: true, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/api': '/' |
| | | } |
| | | }, |
| | | '/api/smis/workstation/export-dp': { |
| | | target: 'http://120.46.212.231:5102', |
| | | // ws: true, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/api': '/' |
| | | } |
| | | }, |
| | | '/api': { |
| | | target: process.env.VUE_APP_API_BASEURL, |
| | | ws: true, |
| | | pathRewrite: { |
| | | '^/myapi': '/' |
| | | // '^/api': '/' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | |