ems-basedata-wdz
Version:
ems-basedata by xianer
67 lines (63 loc) • 1.67 kB
JavaScript
const path = require('path');
const envConfig = require('./config.json')[process.env.VUE_APP_ENV || 'prd'];
function resolve(dir) {
return path.join(__dirname, dir);
}
// let host = envConfig.host
// let host = "http://10.54.48.86:7036";
// const host = 'http://10.0.173.53:8080';
// const host = 'http://emspd-dev.crc.com.cn/';
const host = 'http://emswdz-sit.crc.com.cn';
module.exports = {
lintOnSave: false,
publicPath: './',
productionSourceMap: true,
pages: {
index: {
entry: './src/main.js',
template: './src/template/index.ejs',
filename: 'index.html',
favicon: './favicon.ico',
title: 'baseData',
chunks: ['chunk-vendors', 'chunk-common', 'index']
}
},
css: {
loaderOptions: {
less: {
resources: [path.resolve(__dirname, './src')],
javascriptEnabled: true
}
}
},
devServer: {
disableHostCheck: true,
port: 3001,
https: false,
hotOnly: true,
proxy: {
'/': {
target: host + '/',
secure: false,
changeOrigin: true,
pathRewrite: {
'^/': ''
}
}
}
},
chainWebpack: (config) => {
// 修改文件引入自定义路径
config.resolve.alias
.set('@adminSrc', resolve('./src'))
.set('@adminComponents', resolve('./src/components'))
.set('@adminViews', resolve('./src/views'))
.set('@adminStatic', resolve('./src/static'));
// 输出文件加hash
config.output.filename('[name].[hash].js').end();
},
transpileDependencies: [
'iview',
'ems-components-new'
]
};