12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- const path = require('path')
- function resolve(dir) {
- return path.join(__dirname, dir)
- }
- module.exports = {
- outputDir:'yxnaht',
- publicPath: './',
- lintOnSave: false ,
- productionSourceMap: false,
- devServer: {
- host: '0.0.0.0',
- open: true,
- proxy: {
- '/': {
- // target:'http://192.168.0.12:8082/',//测试
- // target:'http://192.168.0.2:7777/',//开发
- // target:'http://192.168.0.222:7777/',//开发
- // target:'http://192.168.0.20:7777/',//开发
- // target:'http://192.168.1.253:7777/',//测试
- // target:'http://data.cqna.gov.cn/',//线上
- target:'https://www.cqna.gov.cn',//线上
- changeOrigin: true,
- pathRewrite: {
- '^ /': ''
- }
- },
- },
- disableHostCheck: true,
- },
- chainWebpack(config) {
- // set svg-sprite-loader
- config.module
- .rule('svg')
- .exclude.add(resolve('src/icons'))
- .end()
- config.module
- .rule('icons')
- .test(/\.svg$/)
- .include.add(resolve('src/icons'))
- .end()
- .use('svg-sprite-loader')
- .loader('svg-sprite-loader')
- .options({ symbolId: 'icon-[name]' })
- .end()
- }
- }
|