Skip to content

Commit

Permalink
chore: 添加Chrome 商店版打包参数
Browse files Browse the repository at this point in the history
  • Loading branch information
ronggang committed Dec 13, 2019
1 parent c76ae9b commit 3732ac3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@ module.exports = {
title: "PT-Plugin-Plus ChangeLog"
}
},
productionSourceMap: false
productionSourceMap: false,
configureWebpack: {
optimization: {
// 打包为 Chrome 商店版时不对代码进行压缩混淆
minimize: !process.env.CHROME_WEB_STORE
}
}
};
2 changes: 2 additions & 0 deletions webpack/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ module.exports = {
}
}
},
// 打包为 Chrome 商店版时不对代码进行压缩混淆
minimize: !process.env.CHROME_WEB_STORE,
minimizer: [
new TerserPlugin({
// 防止因编码问题导致Chrome无法加载插件
Expand Down

0 comments on commit 3732ac3

Please sign in to comment.