'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.

const path = require('path')

module.exports = {
    dev: {
        // Paths
        assetsSubDirectory: 'static',
        assetsPublicPath: '/',
        proxyTable: {
            '/api': {
                target: 'http://apartmentcloud.xiaozhisz.cn/',
                // target: 'http://test.zhiweisz.cn/',
                // target: 'http://192.168.1.26:8600/',
                changeOrigin: true, //是否跨域
                pathRewrite: {
                    //重写路径
                    '^/api': '' //代理路径
                }
            }
        },
        configureWebpack: {
          resolve: {
            extensions: ['.js', '.vue', '.json'],
            alias: {
              vue$: 'vue/dist/vue.esm.js',
              '@': path.join(__dirname, '/', 'src')
            }
          }
        },
        host: '192.168.1.28',
        port: 8082,
        autoOpenBrowser: false,
        errorOverlay: true,
        notifyOnErrors: true,
        poll: false,
        devtool: 'cheap-module-eval-source-map',
        cacheBusting: true,
        cssSourceMap: true
    },

    build: {
        // Template for index.html
        index: path.resolve(__dirname, '../dist/index.html'),
        assetsRoot: path.resolve(__dirname, '../dist'),
        assetsSubDirectory: 'static',
        assetsPublicPath: '/',
        /**
         * Source Maps
         */
        productionSourceMap: false,
        devtool: '#source-map',

        productionGzip: false,
        productionGzipExtensions: ['js', 'css'],
        bundleAnalyzerReport: process.env.npm_config_report
    }
}
