16 Star 1 Fork 2

sunshine小马/iview-admin-grid

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vue.config.js 3.84 KB
一键复制 编辑 原始数据 按行查看 历史
温酒煮青蛙 提交于 2022-11-23 12:41 +08:00 . 网格管理新 新增地图切换
const path = require('path')
const resolve = dir => {
return path.join(__dirname, dir)
}
// 项目部署基础
// 默认情况下,我们假设你的应用将被部署在域的根目录下,
// 例如:https://www.my-app.com/
// 默认:'/'
// 如果您的应用程序部署在子路径中,则需要在这指定子路径
// 例如:https://www.foobar.com/my-app/
// 需要将它改为'/my-app/'
// iview-admin线上演示打包路径: https://file.iviewui.com/admin-dist/
const BASE_URL = process.env.NODE_ENV === 'production'
? '/grid/'
: '/'
module.exports = {
// rules: [{
// // 使用babel-loader将ES6语法转换为ES5
// test: /\.js$/,
// include: [
// path.resolve(__dirname, 'node_modules/@supermap/iclient-common'),
// path.resolve(__dirname, 'node_modules/@supermap/iclient-ol'),
// // 由于 iClient 对 Elasticsearch 的 API 进行了封装而 Elasticsearch 也使用了 ES6 的语法
// path.resolve(__dirname, 'node_modules/elasticsearch')
// ],
// loader: 'babel-loader',
// options: {
// presets: ['@babel/preset-env'],
// plugins: [
// [
// '@babel/plugin-transform-runtime',
// {
// absoluteRuntime: false,
// corejs: false,
// helpers: false,
// regenerator: true,
// useESModules: false
// }
// ]
// ]
// }
// }],
// Project deployment base
// By default we assume your app will be deployed at the root of a domain,
// e.g. https://www.my-app.com/
// If your app is deployed at a sub-path, you will need to specify that
// sub-path here. For example, if your app is deployed at
// https://www.foobar.com/my-app/
// then change this to '/my-app/'
publicPath: BASE_URL,
outputDir: 'dist/grid',
// tweak internal webpack configuration.
// see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
// 如果你不需要使用eslint,把lintOnSave设为false即可
lintOnSave: true,
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src')) // key,value自行定义,比如.set('@@', resolve('src/components'))
.set('_c', resolve('src/components'))
},
// 打包时不生成.map文件
productionSourceMap: false,
// 这里写你调用接口的基础路径,来解决跨域,如果设置了代理,那你本地开发环境的axios的baseUrl要写为 '' ,即空字符串
// devServer: {
// proxy: 'localhost:3000'
// }
devServer: {
proxy: {
'/Api/Api/': {
ws: false,
target: 'https://txy.sylyx.cn',
// target: 'http://t.hidlq.com',
changeOrigin: true,
secure: false
},
'/v1/': {
ws: false,
target: 'http://csapi.tripln.com',
// target: 'http://t.hidlq.com'
changeOrigin: true,
secure: false
},
'/api/': {
ws: false,
// target: 'http://iview.tripln.top/',
// target: 'http://192.168.31.176:8083',
target: 'http://qstb.mzj.shenyang.gov.cn',
// target: 'http://t.hidlq.com',
// target: 'http://192.168.31.215:8081',
// target: 'http://localhost:8081',
// target: 'http://localhost:8081',
changeOrigin: true,
secure: false
},
'/manager/': {
ws: false,
// target: 'http://iview.tripln.top/',
target: 'http://qstb.mzj.shenyang.gov.cn',
// target: 'http://t.hidlq.com',
changeOrigin: true,
secure: false
},
'/mock/': {
ws: false,
target: 'http://localhost:8080',
// target: 'http://t.hidlq.com',
changeOrigin: true,
secure: false
},
'/portalproxy/': {
ws: false,
target: 'http://124.95.134.62:8195',
// target: 'http://t.hidlq.com',
changeOrigin: true,
secure: false
}
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/sunshine_xiaoma/iview-admin-grid.git
git@gitee.com:sunshine_xiaoma/iview-admin-grid.git
sunshine_xiaoma
iview-admin-grid
iview-admin-grid
master

搜索帮助