提交 6b0ea16e 编写于 作者: fxy060608's avatar fxy060608

feat(stat): support enable='development'

上级 1fb17aa0
...@@ -140,15 +140,21 @@ if (platformOptions.usingComponents === true) { ...@@ -140,15 +140,21 @@ if (platformOptions.usingComponents === true) {
} }
if ( if (
process.env.NODE_ENV === 'production' && process.env.UNI_USING_COMPONENTS ||
(process.env.UNI_USING_COMPONENTS || process.env.UNI_PLATFORM === 'h5') process.env.UNI_PLATFORM === 'h5'
) { // 自定义组件模式或 h5 平台 ) { // 自定义组件模式或 h5 平台
const uniStatistics = Object.assign( const uniStatistics = Object.assign(
manifestJsonObj.uniStatistics || {}, manifestJsonObj.uniStatistics || {},
platformOptions.uniStatistics || {} platformOptions.uniStatistics || {}
) )
if (uniStatistics.enable !== false) { if (
uniStatistics.enable !== false &&
(
process.env.NODE_ENV === 'production' ||
uniStatistics.enable === 'development'
)
) {
if (process.UNI_STAT_CONFIG.appid) { if (process.UNI_STAT_CONFIG.appid) {
process.env.UNI_USING_STAT = true process.env.UNI_USING_STAT = true
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册