From 0e3ae492cf73d4158c060e38aa1609a46cf7c74e Mon Sep 17 00:00:00 2001 From: Su Yang Date: Thu, 27 Jan 2022 19:26:42 +0800 Subject: [PATCH] chore: turn off source map at production env (#122) --- vue.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vue.config.js b/vue.config.js index d660da0..0335098 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,3 +1,5 @@ +const isProd = process.env.NODE_ENV === `production` + module.exports = { publicPath: process.env.SERVER_ENV === `NETLIFY` ? `/` : `/md/`, // 基本路径, 建议以绝对路径跟随访问目录 configureWebpack: (config) => { @@ -8,7 +10,8 @@ module.exports = { }] }) }, + productionSourceMap: !isProd, css: { - sourceMap: true, + sourceMap: !isProd, }, }