Fetch the repository succeeded.
const { resolve } = require('path')
const pkg = require('./package')
global.HTMLElement = typeof window === 'undefined' ? Object : window.HTMLElement
export default {
mode: 'spa',
env: {
ENV_PRODUCT: process.env.ENV_PRODUCT
},
server: {
port: 8090, // default: 3000
host: '0.0.0.0' // default: localhost
},
/*
** Headers of the page
*/
head: {
title: pkg.title,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: pkg.description }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/logo1.ico' },
{ rel: 'stylesheet', href: '/swiper/swiper.min.css' }
],
script: [
{ src: 'https://hm.baidu.com/hm.js?82c11fd530815e303d1d612a3ab9f88d' },
{ src: 'https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js' },
{ src: '/swiper/swiper.min.js' },
{ src: '/js/xlsx.core.min.js' },
{ src: '/js/xlsx.js' },
{ src: '/js/jszip.js' },
{ src: '/3d-force-graph/3d-force-graph.min.js' },
{ src: '/3d-force-graph/three.js' },
{ src: '/3d-force-graph/three-spritetext.min.js' }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: ['@/assets/main.css'],
/*
** Plugins to load before mounting the App
*/
plugins: [
'@/plugins/element-ui',
'@/plugins/svg-icon',
'@/plugins/axios',
'@/plugins/vue-map',
'@/plugins/vue-elementui-bigdata-table',
'@/plugins/datav',
'@/plugins/baiduhm'
],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
// Doc: https://www.npmjs.com/package/@nuxtjs/markdownit
'@nuxtjs/markdownit'
// // https://github.com/schlunsen/nuxt-leaflet
// 'nuxt-leaflet'
],
/*
** Axios module configuration
*/
axios: {
// See https://github.com/nuxt-community/axios-module#options
proxy: true // Can be also an object with default options
},
proxy: {
//'/filesys': 'http://172.16.35.242:8000/',
// 服务器调试
//'/api': 'http://172.16.35.242:8082'
// 服务器调试
'/api-dg': 'https://hehu.91xunbang.cn:3000',
// '/api': 'http://192.168.102.23:8082',
// 本地调试
// '/api': 'http://localhost:8082',
// '/api-dg':'https://hehu.zjwater.com:10443',
'api': 'http://192.168.2.232',
'/files': {
// target: 'https://192.168.102.23:8084',
target: 'http://localhost:80',
changeOrigin: true
},
'/mlhh': {
// target: 'https://192.168.102.23:8084',
target: 'https://192.168.102.23:8084/files/mlhh',
changeOrigin: true
},
'/geocode': 'https://restapi.amap.com/v3',
'/arcgis': 'https://192.168.102.23:8084',
// '/arcgis': 'http://192.168.101.1:6080',
'/tiandituURL': {
target: 'http://t1.tianditu.gov.cn', // 设置调用接口域名和端口号别忘了加http
changeOrigin: true,
pathRewrite: {
'^/tiandituURL': '/'
}
}
// 本地调试
// '/api': 'http://localhost:8082'
},
/*
** markdownit module configuration
*/
markdownit: {
// See https://github.com/markdown-it/markdown-it
injected: true,
preset: 'default',
linkify: true,
breaks: true,
use: [
// ['markdown-it-container', containerName],
// 'markdown-it-attrs'
]
},
/*
** 路由
*/
router: {
middleware: 'agent',
// extendRoutes(routes, resolve) {
// routes.push({
// // name: 'index',
// path: '/',
// redirect: '/oldIndex',
// // component: resolve(__dirname, 'pages/oldIndex.vue')
// })
// }
},
/*
** Build configuration
*/
build: {
transpile: [/^element-ui/],
/*
** You can extend webpack config here
*/
extend(config, ctx) {
const svgRule = config.module.rules.find(rule => rule.test.test('.svg'))
svgRule.exclude = [resolve(__dirname, 'assets/svg')]
// Includes /assets/svg for svg-sprite-loader
config.module.rules.push({
test: /\.svg$/,
include: [resolve(__dirname, 'assets/svg')],
loader: 'svg-sprite-loader',
options: {
symbolId: 'icon-[name]'
}
})
// Run ESLint on save
if (ctx.isDev && ctx.isClient) {
// config.module.rules.push({
// enforce: 'pre',
// test: /\.(js|vue)$/,
// loader: 'eslint-loader',
// exclude: /(node_modules)/
// })
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。