From b0ff7eab972703a48abbd81d0bcb58e6e014c4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Thu, 23 Dec 2021 09:49:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8C=85=E5=90=8E?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E5=9B=BE=E6=A0=87=E5=81=B6=E5=B0=94=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E4=B9=B1=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZR.Vue/vue.config.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/ZR.Vue/vue.config.js b/ZR.Vue/vue.config.js index 8e08514..d997ca5 100644 --- a/ZR.Vue/vue.config.js +++ b/ZR.Vue/vue.config.js @@ -12,7 +12,12 @@ const name = defaultSettings.title // 标题 // 这里只列一部分,具体配置参考文档 module.exports = { css: { - sourceMap: process.env.NODE_ENV == 'production' ? false : true //开启css source maps功能,前端可以看到css具体的行数 + sourceMap: process.env.NODE_ENV == 'production' ? false : true, //开启css source maps功能,前端可以看到css具体的行数 + loaderOptions: { + sass: { + sassOptions: { outputStyle: "expanded" } + } + } }, // 部署生产环境和开发环境下的URL。 // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 @@ -28,16 +33,16 @@ module.exports = { productionSourceMap: false, // webpack-dev-server 相关配置 devServer: { - host: '0.0.0.0',//项目启动host - port: 8887,// 项目启动port, + host: '0.0.0.0', //项目启动host + port: 8887, // 项目启动port, open: true, proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: 'http://localhost:8888/',// 后端接口地址 + target: 'http://localhost:8888/', // 后端接口地址 changeOrigin: true, pathRewrite: { - ['^' + process.env.VUE_APP_BASE_API]: ''//需要rewrite的 + ['^' + process.env.VUE_APP_BASE_API]: '' //需要rewrite的 } } }, @@ -51,8 +56,7 @@ module.exports = { '@': resolve('src') } }, - plugins: [ - ] + plugins: [] }, chainWebpack(config) { config.plugins.delete('preload') // TODO: need test @@ -118,4 +122,4 @@ module.exports = { } ) } -} +} \ No newline at end of file