123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- // see http://vuejs-templates.github.io/webpack for documentation.
- var path = require('path')
- module.exports = {
- build: {
- prodEnv: require('./prod.env'),
- index: path.resolve(__dirname, '../dist/index.html'),
- assetsRoot: path.resolve(__dirname, '../dist'),
- assetsSubDirectory: 'static',
- assetsPublicPath: './', //请根据自己路径配置更改
- productionSourceMap: false,
- // Gzip off by default as many popular static hosts such as
- // Surge or Netlify already gzip all static assets for you.
- // Before setting to `true`, make sure to:
- // npm install --save-dev compression-webpack-plugin
- productionGzip: false,
- productionGzipExtensions: ['js', 'css'],
- // Run the build command with an extra argument to
- // View the bundle analyzer report after build finishes:
- // `npm run build --report`
- // Set to `true` or `false` to always turn it on or off
- bundleAnalyzerReport: process.env.npm_config_report
- },
- dev: {
- host: 'localhost', // can be overwritten by process.env.HOST
- env: require('./dev.env'),
- port: 9527,
- autoOpenBrowser: true,
- assetsSubDirectory: 'static',
- assetsPublicPath: '/',
- proxyTable: {
- '/api': {
- // target: 'http://192.168.50.104:8083',
- // target: 'http://192.168.50.50:12002',
- // target: 'http://192.168.80.230:14100',
- // target: 'http://192.168.123.15:8098/api',
- //target: 'http://172.16.11.21:8097/api',//天津
- target:' http://101.36.160.210:31050',//陕西
- // target: 'http://192.168.40.174:13100',
- secure: false, // 如果是https接口,需要配置这个参数
- changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
- pathRewrite: {
- '^/api': ''
- },
- },
- '/loginApi': {
- // target: 'http://218.241.206.66:8097',
- // target: 'http://192.168.50.104:8002',
- // target: 'http://192.168.80.230:8097',
- // target: 'http://192.168.123.15:8098/api',
- target: 'http://172.16.11.21:8097',
- // target: 'http://192.168.123.15:13100',
- secure: false, //如果是https接口,需要配置这个参数
- changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
- pathRewrite: {
- '^/loginApi': ''
- },
- },
- '/main': {
- // target: 'http://192.168.50.104:8083',
- // target: 'http://192.168.123.15:11050',
- target: 'http://10.223.3.39:9090/api',//郭
- secure: false, // 如果是https接口,需要配置这个参数
- changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
- pathRewrite: {
- '^/main': ''
- },
- },
- '/uniteApi': { //统一线上api
- target: 'http://192.168.123.15:8098/api',
- // target: 'http://172.16.11.21:8097/api',
- secure: false, // 如果是https接口,需要配置这个参数
- changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
- pathRewrite: {
- '^/uniteApi': ''
- },
- },
- '/fileApi': {
- target: 'http://192.168.123.15:8098/api',
- secure: false, // 如果是https接口,需要配置这个参数
- changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
- pathRewrite: {
- '^/fileApi': ''
- },
- },
- '/submit': {
- target: 'http://172.16.11.21:8097/api',
- secure: false, // 如果是https接口,需要配置这个参数
- changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
- pathRewrite: {
- '^/submit': ''
- },
- },
- },
- // CSS Sourcemaps off by default because relative paths are "buggy"
- // with this option, according to the CSS-Loader README
- // (https://github.com/webpack/css-loader#sourcemaps)
- // In our experience, they generally work as expected,
- // just be aware of this issue when enabling this option.
- cssSourceMap: false
- }
- };
|