fayuanjiangbei/vue.config.js

39 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module.exports = {
// 打包文件配置
publicPath: "/",
assetsDir: "static",
lintOnSave: false,
devServer: {
// overlay: { // 让浏览器 overlay 同时显示警告和错误
// warnings: true,
// errors: true,
// },
// hotOnly: true,
// open: false, // npm run serve后自动打开页面
// https: false, // https:{type:Boolean}
// host: "0.0.0.0", // 匹配本机IP地址(默认是0.0.0.0)
// port: 8989, // 开发服务器运行端口号
proxy: {
'/api': { //代理的名字
target:'http://172.16.1.253:12308/api/',
ws: true,
changeOrigin: true,
pathRewrite:{
'^/api':'',
}
},
}
},
// css: {
// loaderOptions: {
// postcss: {
// plugins: [
// require("postcss-px2rem-exclude")({
// // 在这里由于我的设计稿尺寸的屏幕分辨率是1920具体原因如下
// remUnit: 576, // 设计稿尺寸/10
// }),
// ],
// },
// },
// },
}