提交 46ed2aa9 编写于 作者: KK's avatar KK

代码格式化vue.config.js

上级 0c572578
<#ibiztemplate> <#ibiztemplate>
TARGET=PSSYSAPP TARGET=PSSYSAPP
</#ibiztemplate> </#ibiztemplate>
/**
* vue配置文件
*
* @vue.config.js
*/
const path = require('path'); const path = require('path');
const os = require('os'); const os = require('os');
function resolve(dir) { function resolve(dir) {
return path.join(__dirname, dir) return path.join(__dirname, dir);
} }
<#assign indexPageCount = 0/> <#assign indexPageCount = 0/>
...@@ -19,20 +24,7 @@ module.exports = { ...@@ -19,20 +24,7 @@ module.exports = {
port: 8111, port: 8111,
compress: true, compress: true,
disableHostCheck: true, disableHostCheck: true,
proxy: { // proxy: "http://127.0.0.1:8080/${app.getPKGCodeName()}",
"/map":{
//配置跨域
target: "http://restapi.amap.com",
changOrigin:true,
pathRewrite:{
'^/map':'/'
}
},
'': {
target: "http://127.0.0.1:8080/${app.getPKGCodeName()}",
}
},
historyApiFallback: { historyApiFallback: {
rewrites: [ rewrites: [
<#if app.getAllRefPSAppViews()??> <#if app.getAllRefPSAppViews()??>
...@@ -109,9 +101,9 @@ module.exports = { ...@@ -109,9 +101,9 @@ module.exports = {
<#if app.getDefaultPSAppView()??> <#if app.getDefaultPSAppView()??>
<#assign defView = app.getDefaultPSAppView()/> <#assign defView = app.getDefaultPSAppView()/>
// 删除自动计算预加载资源 // 删除自动计算预加载资源
config.plugins.delete('preload-${defView.getCodeName()?lower_case}') config.plugins.delete('preload-${defView.getCodeName()?lower_case}');
// 删除预加载资源 // 删除预加载资源
config.plugins.delete('prefetch-${defView.getCodeName()?lower_case}') config.plugins.delete('prefetch-${defView.getCodeName()?lower_case}');
</#if> </#if>
<#if app.getAllRefPSAppViews()??> <#if app.getAllRefPSAppViews()??>
<#list app.getAllRefPSAppViews() as appview> <#list app.getAllRefPSAppViews() as appview>
...@@ -133,11 +125,11 @@ module.exports = { ...@@ -133,11 +125,11 @@ module.exports = {
.set('@app-core', resolve('src/app-core')) .set('@app-core', resolve('src/app-core'))
.set('@ibiz-core', resolve('src/ibiz-core')) .set('@ibiz-core', resolve('src/ibiz-core'))
.set('@ui-service', resolve('src/ui-service')) .set('@ui-service', resolve('src/ui-service'))
.set('@global-ui-service', resolve('src/global-ui-service')) .set('@global-ui-service', resolve('src/global-ui-service'));
}, },
configureWebpack: config => { configureWebpack: config => {
let ForkTsCheckerPlugin; let ForkTsCheckerPlugin;
if(config.plugins.length > 0){ if(config.plugins.length > 0) {
ForkTsCheckerPlugin = config.plugins.find(element =>{ ForkTsCheckerPlugin = config.plugins.find(element =>{
return element.workersNumber && element.memoryLimit; return element.workersNumber && element.memoryLimit;
}) })
...@@ -160,4 +152,4 @@ module.exports = { ...@@ -160,4 +152,4 @@ module.exports = {
patterns: [path.resolve(__dirname, 'src/styles/var.less')] patterns: [path.resolve(__dirname, 'src/styles/var.less')]
} }
}, },
} };
\ No newline at end of file \ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册