代码拉取完成,页面将自动刷新
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
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。