Skip to content

Commit cefcc77

Browse files
committed
chore: global bundle 忽略掉雨燕监控
1 parent 631af75 commit cefcc77

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

packages/toolkit/webpack/config.build.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ const globalBundle = createWebpackConfig({
8080
[config.editorAllGlobalEntry]: './packages/alex/src/editor.all',
8181
[config.editorAllGlobalMiniEntry]: './packages/alex/src/editor.all',
8282
},
83+
resolve: {
84+
// global 对外使用,忽略掉 yuyan 埋点
85+
alias: {
86+
'@alipay/yuyan-monitor-web': path.resolve(__dirname, 'patches', 'yuyan-monitor.js'),
87+
},
88+
},
8389
// 此处 bundle 的包仅作为 commonjs 使用,但因为 external 原因会导致 webpack4 加载 bundle 出错,因此还是使用 umd
8490
output: {
8591
library: 'Alex',
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const NOOP = () => {}
2+
module.exports = class YuyanMonitor {
3+
config = NOOP;
4+
log = NOOP;
5+
logError = NOOP;
6+
logRequestError = NOOP;
7+
}

0 commit comments

Comments
 (0)