yzxy-pc/vue.config.js

62 lines
1.8 KiB
JavaScript

// const UploadToOssPlugin = require('./scripts/uploadToOssPlugin')
module.exports = {
// publicPath: process.env.NODE_ENV === 'production'
// ? 'https://cqxy-bank.oss-cn-chengdu.aliyuncs.com/xinye-bank/cms'
// : '/',
lintOnSave: false,
productionSourceMap: false,
css: {
loaderOptions: {
stylus: {
"resolve url": true,
import: ["./src/theme"],
},
},
},
// configureWebpack: config => {
// if (process.env.NODE_ENV !== 'production') return
// return {
// plugins: [
// new UploadToOssPlugin({
// cdnpath: '/xinye-bank/cms',
// ossOption: {
// region: 'oss-cn-chengdu',
// accessKeyId: 'LTAI5tGGZzjf3tvqWk8SQj2G',
// accessKeySecret: 'S0NKOAUaYWoK4EGSxrMFmYDzllhvpq',
// bucket: 'cqxy-bank'
// }
// })
// ]
// }
// },
pluginOptions: {
"cube-ui": {
postCompile: true,
theme: true,
},
},
devServer: {
open: true,
host: "127.0.0.1",
port: 80,
proxy: {
// 配置跨域
"/api": {
// target: "http://211.137.105.198:8020/",
// target: "http://192.168.6.99:8030",
// target:"https://pfapi.86698.cn/",
// target:"http://43.137.49.108:8080/",
target:"http://cdxy.qyff.86698.cn/",
ws: true,
changOrigin: true,
secure: true,
pathRewrite: {
"^/api": "",
},
}
},
// before: (app) => {},
},
};