chore: turn off source map at production env (#122)

This commit is contained in:
Su Yang 2022-01-27 19:26:42 +08:00 committed by GitHub
parent a5da935e6c
commit 0e3ae492cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
},
}