1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- 'use strict'
- const path = require('path')
- module.exports = {
- dev: {
- assetsSubDirectory: 'static',
- assetsPublicPath: '/',
- proxyTable: {
- '/api': {
- //target: 'http://120.79.211.173:7510',//测试后端接口地址
- target: 'http://admin.test.toktok.beer',//测试后端接口地址
- //target: 'http://admin.toktok.beer',//生产后端接口地址
- changeOrigin: true, //是否跨域
- pathRewrite: {
- '^/api': '/',//重写,
- }
- }
- },
- // 本地开发使用
- host: 'localhost',
- port: 9527,
- autoOpenBrowser: true,
- errorOverlay: true,
- notifyOnErrors: false,
- poll: false,
- useEslint: true,
- showEslintErrorsInOverlay: false,
- devtool: 'cheap-source-map',
- cssSourceMap: false
- },
- build: {
- index: path.resolve(__dirname, '../dist/index.html'),
- assetsRoot: path.resolve(__dirname, '../dist'),
- assetsSubDirectory: 'static',
- assetsPublicPath: './',
- productionSourceMap: false,
- devtool: 'source-map',
- productionGzip: false,
- productionGzipExtensions: ['js', 'css'],
- bundleAnalyzerReport: process.env.npm_config_report || false,
- generateAnalyzerReport: process.env.npm_config_generate_report || false
- }
- }
|