sentry-miniapp 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +338 -0
- package/README.md +46 -13
- package/dist/sentry-miniapp.cjs.js +1 -1
- package/dist/sentry-miniapp.cjs.js.map +1 -1
- package/dist/sentry-miniapp.esm.js +1 -1
- package/dist/sentry-miniapp.esm.js.map +1 -1
- package/dist/sentry-miniapp.umd.js +1 -1
- package/dist/sentry-miniapp.umd.js.map +1 -1
- package/dist/types/types.d.ts +30 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +46 -35
package/README.en.md
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
# Sentry Miniapp SDK — Mini Program Monitoring SDK
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
[简体中文](./README.md) | English
|
|
11
|
+
|
|
12
|
+
A **mini program monitoring SDK** built on `@sentry/core` (v10.45.0), providing **error monitoring**, **performance monitoring**, offline caching, and distributed tracing. Supports WeChat, Alipay, ByteDance, Baidu, QQ, DingTalk, Kuaishou mini programs and cross-platform frameworks (Taro / uni-app).
|
|
13
|
+
|
|
14
|
+
> **What are Mini Programs?** Mini programs (小程序) are lightweight apps that run inside super-apps like WeChat, Alipay, and ByteDance/Douyin. They form a massive ecosystem in China with **hundreds of millions of daily active users**, but have no direct equivalent in the Western tech stack. Think of them as a hybrid between PWAs and native apps, but hosted within a platform's sandbox.
|
|
15
|
+
|
|
16
|
+
> **Version Notes**
|
|
17
|
+
>
|
|
18
|
+
> - `v1.x.x`: New architecture based on Sentry V10 core. Full support for WeChat, Alipay, ByteDance, Baidu, QQ, DingTalk, Kuaishou mini programs and cross-platform frameworks (Taro / uni-app).
|
|
19
|
+
> - `v0.x.x`: Legacy version, no longer maintained.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Core Features
|
|
24
|
+
|
|
25
|
+
- **Modern Architecture**: Built on the latest Sentry JavaScript V10 SDK core modules.
|
|
26
|
+
- **True Multi-Platform Support**: Built-in API abstraction engine — one codebase seamlessly supports **WeChat, Alipay, ByteDance, Baidu, QQ, DingTalk, and Kuaishou** mini program platforms.
|
|
27
|
+
- **Automatic Exception Capture**: No business code intrusion required. Automatically hooks into lifecycle error listeners (`onError`, `onUnhandledRejection`, `onPageNotFound`, `onMemoryWarning`).
|
|
28
|
+
- **Rich Context Breadcrumbs**: Automatically records device info, user tap/touch interactions, network requests (XHR/Fetch), and page navigation paths.
|
|
29
|
+
- **Built-in SourceMap Path Normalization**: Handles virtual stack paths across WeChat, Alipay, ByteDance and other platforms. Works with sentry-cli for seamless SourceMap resolution.
|
|
30
|
+
- **Offline Caching for Weak Networks**: Designed for mini program network conditions. Automatically caches events to local storage on network failure, silently retries when connectivity is restored.
|
|
31
|
+
- **Deep Performance Monitoring**: Integrates mini program Performance API for navigation timing (FCP/LCP), render performance, resource loading, and custom performance marks.
|
|
32
|
+
- **Smart Deduplication & Filtering**: Built-in error deduplication and sample rate controls to prevent log storms.
|
|
33
|
+
- **Cross-Platform Framework Friendly**: Works seamlessly with Taro, uni-app, and other cross-platform compilation frameworks.
|
|
34
|
+
- **Distributed Tracing**: Automatically injects `sentry-trace` / `baggage` headers into network requests, connecting mini program and backend service call chains.
|
|
35
|
+
- **Session Health Monitoring**: Automatic session lifecycle management with crash rate and session health data in the Sentry Release Health dashboard.
|
|
36
|
+
- **Network Status Monitoring**: Real-time tracking of network changes (WiFi/4G/offline) to help diagnose network-related exceptions.
|
|
37
|
+
- **Stack Trace Parsing**: Built-in multi-platform stack parser supporting V8/Safari/JavaScriptCore formats for precise error location with SourceMap.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install sentry-miniapp --save
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
> **Note:** Starting from `v1.1.0`, the build strategy has been optimized (dependencies are inlined), so there is **no need** to install `@sentry/core` separately.
|
|
48
|
+
|
|
49
|
+
*Tip: If you don't use npm, you can also copy `examples/wxapp/lib/sentry-miniapp.js` from this repository directly into your mini program project.*
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Quick Start
|
|
54
|
+
|
|
55
|
+
### 1. Prerequisites
|
|
56
|
+
|
|
57
|
+
1. Ensure you have a Sentry account ([Sentry SaaS](https://sentry.io/) or self-hosted).
|
|
58
|
+
2. **Important**: Add your Sentry reporting endpoint domain to the `request` trusted domain list in your mini program platform's admin console.
|
|
59
|
+
|
|
60
|
+
### 2. Initialize the SDK
|
|
61
|
+
|
|
62
|
+
Initialize Sentry at the **top** of your mini program entry file (e.g., `app.js` or `app.ts`), **before** calling `App()`.
|
|
63
|
+
|
|
64
|
+
```javascript
|
|
65
|
+
import * as Sentry from 'sentry-miniapp';
|
|
66
|
+
|
|
67
|
+
Sentry.init({
|
|
68
|
+
dsn: 'https://<key>@sentry.io/<project>',
|
|
69
|
+
environment: 'production',
|
|
70
|
+
release: 'my-project-name@1.0.0',
|
|
71
|
+
|
|
72
|
+
// --- Mini Program Configuration ---
|
|
73
|
+
platform: 'wechat', // Current platform (wechat | alipay | bytedance | dd | swan, etc.)
|
|
74
|
+
enableSystemInfo: true, // Auto-collect system and device info
|
|
75
|
+
enableUserInteractionBreadcrumbs: true, // Auto-record user tap events
|
|
76
|
+
enableNavigationBreadcrumbs: true, // Auto-record page navigation
|
|
77
|
+
traceNetworkBody: true, // Record request/response bodies in breadcrumbs (default: false)
|
|
78
|
+
|
|
79
|
+
// --- Offline Cache & Reliability ---
|
|
80
|
+
enableOfflineCache: true, // Enable offline caching with retry (default: true)
|
|
81
|
+
offlineCacheLimit: 30, // Max cached events (default: 30)
|
|
82
|
+
|
|
83
|
+
// --- SourceMap Support ---
|
|
84
|
+
enableSourceMap: true, // Normalize virtual stack paths for SourceMap resolution
|
|
85
|
+
|
|
86
|
+
// --- Sampling ---
|
|
87
|
+
sampleRate: 1.0, // Error reporting sample rate (0.0 - 1.0)
|
|
88
|
+
|
|
89
|
+
// --- Distributed Tracing ---
|
|
90
|
+
enableTracePropagation: true, // Auto-inject sentry-trace/baggage headers (default: true)
|
|
91
|
+
tracePropagationTargets: ['api.example.com'], // Only inject tracing headers for specified domains
|
|
92
|
+
|
|
93
|
+
// --- Session & Network Monitoring ---
|
|
94
|
+
enableAutoSessionTracking: true, // Auto session lifecycle management (default: true)
|
|
95
|
+
enableNetworkStatusMonitoring: true, // Real-time network status monitoring (default: true)
|
|
96
|
+
|
|
97
|
+
// Optional: Performance monitoring
|
|
98
|
+
integrations: [
|
|
99
|
+
Sentry.performanceIntegration({
|
|
100
|
+
enableNavigation: true, // Navigation timing
|
|
101
|
+
enableRender: true, // Render timing
|
|
102
|
+
enableResource: true, // Resource loading timing
|
|
103
|
+
}),
|
|
104
|
+
]
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
App({
|
|
108
|
+
onLaunch() {
|
|
109
|
+
// ...
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Advanced Usage
|
|
117
|
+
|
|
118
|
+
After initialization, the SDK works automatically in the background. You can also use the following APIs for manual instrumentation.
|
|
119
|
+
|
|
120
|
+
### Manual Exception & Message Reporting
|
|
121
|
+
|
|
122
|
+
```javascript
|
|
123
|
+
// Manually capture and report an Error
|
|
124
|
+
try {
|
|
125
|
+
throw new Error('Payment API parsing failed');
|
|
126
|
+
} catch (error) {
|
|
127
|
+
Sentry.captureException(error);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Log a message
|
|
131
|
+
Sentry.captureMessage('User cancelled authorization', 'info');
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Context Enrichment (Context & Breadcrumbs)
|
|
135
|
+
|
|
136
|
+
```javascript
|
|
137
|
+
// Set current user info
|
|
138
|
+
Sentry.setUser({
|
|
139
|
+
id: 'user_12345',
|
|
140
|
+
username: 'John Doe'
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
// Set global tags for filtering and analytics
|
|
144
|
+
Sentry.setTag('page_module', 'checkout_counter');
|
|
145
|
+
|
|
146
|
+
// Manually add a breadcrumb
|
|
147
|
+
Sentry.addBreadcrumb({
|
|
148
|
+
message: 'User tapped [Confirm Payment] button',
|
|
149
|
+
category: 'action',
|
|
150
|
+
level: 'info',
|
|
151
|
+
data: { cartId: 'c_888' }
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Custom Performance Measurement
|
|
156
|
+
|
|
157
|
+
```javascript
|
|
158
|
+
// Mark start point
|
|
159
|
+
Sentry.addPerformanceMark('api-request-start');
|
|
160
|
+
// ... perform operation
|
|
161
|
+
Sentry.addPerformanceMark('api-request-end');
|
|
162
|
+
|
|
163
|
+
// Measure the interval
|
|
164
|
+
Sentry.measurePerformance('fetch-user-data', 'api-request-start', 'api-request-end');
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Dynamic Sampling (tracesSampler)
|
|
168
|
+
|
|
169
|
+
Beyond the global `sampleRate`, you can use the `tracesSampler` callback for fine-grained, per-page sampling control:
|
|
170
|
+
|
|
171
|
+
```javascript
|
|
172
|
+
Sentry.init({
|
|
173
|
+
dsn: '...',
|
|
174
|
+
tracesSampler: ({ name, inheritOrSampleWith }) => {
|
|
175
|
+
// 100% sampling for critical pages
|
|
176
|
+
if (name.includes('pages/index') || name.includes('pages/pay')) {
|
|
177
|
+
return 1;
|
|
178
|
+
}
|
|
179
|
+
// Lower sampling for low-priority pages
|
|
180
|
+
if (name.includes('pages/about') || name.includes('pages/settings')) {
|
|
181
|
+
return 0.1;
|
|
182
|
+
}
|
|
183
|
+
// Inherit upstream decision or fall back to 50%
|
|
184
|
+
return inheritOrSampleWith(0.5);
|
|
185
|
+
},
|
|
186
|
+
});
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
> **Note:** When `tracesSampler` is set, `tracesSampleRate` is ignored. `tracesSampler` takes priority.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## SourceMap Support
|
|
194
|
+
|
|
195
|
+
The SDK includes built-in multi-platform stack path normalization (`enableSourceMap: true`, enabled by default), automatically converting platform-specific virtual paths to the `app:///` prefix for seamless SourceMap resolution with sentry-cli.
|
|
196
|
+
|
|
197
|
+
**Quick upload example:**
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
sentry-cli releases files "my-miniapp@1.0.0" upload-sourcemaps ./dist \
|
|
201
|
+
--url-prefix "app:///" \
|
|
202
|
+
--ext js --ext map
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
> For a complete end-to-end setup guide (build tool configs, CI/CD integration, verification & troubleshooting), see **[Source Map Configuration Guide](./docs/SOURCEMAP_GUIDE.md)**.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## User Feedback
|
|
210
|
+
|
|
211
|
+
In web environments, Sentry provides a built-in `showReportDialog()` popup. However, mini programs have no DOM, so this method is **not available**.
|
|
212
|
+
|
|
213
|
+
Instead, build a **native mini program form or modal** to collect user feedback, then submit it via `Sentry.captureFeedback()`:
|
|
214
|
+
|
|
215
|
+
```javascript
|
|
216
|
+
const userMessage = 'The page is frozen, nothing responds';
|
|
217
|
+
const userName = 'John Doe';
|
|
218
|
+
const userEmail = 'john@example.com';
|
|
219
|
+
|
|
220
|
+
Sentry.captureFeedback({
|
|
221
|
+
message: userMessage,
|
|
222
|
+
name: userName,
|
|
223
|
+
email: userEmail,
|
|
224
|
+
// Optional: associate with a specific error event
|
|
225
|
+
// associatedEventId: 'abc123xyz...'
|
|
226
|
+
});
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Bundle Size Optimization (Zero Main Package Overhead)
|
|
232
|
+
|
|
233
|
+
Mini program "main package" size is limited (typically 2MB). `sentry-miniapp` includes the full `@sentry/core` engine and multi-platform adapters, totaling ~100KB.
|
|
234
|
+
|
|
235
|
+
If main package size is a concern, use **subpackage async loading** or **dynamic loading** to move the SDK entirely into a subpackage.
|
|
236
|
+
|
|
237
|
+
### Option A: WeChat / Alipay (Recommended)
|
|
238
|
+
|
|
239
|
+
WeChat and Alipay natively support [subpackage async loading](https://developers.weixin.qq.com/miniprogram/dev/framework/subpackages/async.html).
|
|
240
|
+
|
|
241
|
+
```javascript
|
|
242
|
+
// app.js
|
|
243
|
+
App({
|
|
244
|
+
onLaunch() {
|
|
245
|
+
require.async('./subpackageA/sentry-miniapp.js').then((Sentry) => {
|
|
246
|
+
Sentry.init({
|
|
247
|
+
dsn: 'https://xxxxxxxx@sentry.io/12345',
|
|
248
|
+
// ...other options
|
|
249
|
+
});
|
|
250
|
+
console.log('Sentry loaded and initialized successfully');
|
|
251
|
+
}).catch(err => {
|
|
252
|
+
console.error('Failed to load Sentry', err);
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
*This way, Sentry's ~100KB is counted against `subpackageA`'s size — zero main package overhead!*
|
|
259
|
+
|
|
260
|
+
### Option B: Other Platforms (ByteDance, Baidu, etc.)
|
|
261
|
+
|
|
262
|
+
For platforms that don't support `require.async`, use **subpackage predownload + dynamic loading**:
|
|
263
|
+
|
|
264
|
+
```javascript
|
|
265
|
+
// ByteDance mini program example
|
|
266
|
+
App({
|
|
267
|
+
onLaunch() {
|
|
268
|
+
const loadTask = tt.loadSubpackage({
|
|
269
|
+
name: 'subpackageA',
|
|
270
|
+
success: () => {
|
|
271
|
+
const Sentry = require('./subpackageA/sentry-miniapp.js');
|
|
272
|
+
Sentry.init({ dsn: '...' });
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
*Note: If using Taro / uni-app, you can use `import('sentry-miniapp')` dynamic import syntax — the framework handles cross-platform differences at compile time.*
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## FAQ
|
|
284
|
+
|
|
285
|
+
### 1. Do I need to manually report errors in `onError`?
|
|
286
|
+
|
|
287
|
+
**No.** `sentry-miniapp` automatically hooks into platform-level global error listeners (e.g., `wx.onError`) during initialization. As long as `Sentry.init` is called **before** `App()`, it captures all unhandled JS exceptions automatically.
|
|
288
|
+
|
|
289
|
+
If errors are not being reported, check:
|
|
290
|
+
1. Whether the Sentry domain is in the mini program's trusted domain list.
|
|
291
|
+
2. Whether `sampleRate` is set too low.
|
|
292
|
+
3. Some WeChat DevTools environments don't trigger `onError` — test on a **real device**.
|
|
293
|
+
|
|
294
|
+
### 2. Does this SDK support Session Replay?
|
|
295
|
+
|
|
296
|
+
**Not currently.** Sentry's official Replay feature relies on standard browser DOM (via rrweb recording). Mini programs use a dual-thread architecture without standard DOM access. We recommend using **Breadcrumbs** combined with **custom logging** to reconstruct user action sequences.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Documentation
|
|
301
|
+
|
|
302
|
+
| Document | Description |
|
|
303
|
+
|----------|-------------|
|
|
304
|
+
| [SourceMap Configuration Guide](./docs/SOURCEMAP_GUIDE.md) | End-to-end SourceMap setup, build tools, CI/CD, verification & troubleshooting |
|
|
305
|
+
| [Multi-Platform Compatibility Report](./docs/MultiPlatformCompatibilityReport.md) | Platform API compatibility matrix and differences |
|
|
306
|
+
| [Example Project](./examples/wxapp/) | Complete WeChat mini program integration example |
|
|
307
|
+
| [Development Guide](./DEVELOPMENT.md) | Local development setup and debugging |
|
|
308
|
+
| [Contributing Guide](./CONTRIBUTING.md) | How to contribute to the project |
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## Contributing
|
|
313
|
+
|
|
314
|
+
We welcome Pull Requests and Issues!
|
|
315
|
+
|
|
316
|
+
Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and guidelines.
|
|
317
|
+
|
|
318
|
+
Quick start:
|
|
319
|
+
|
|
320
|
+
1. `npm install` — install dependencies
|
|
321
|
+
2. `npm run dev` — start watch mode
|
|
322
|
+
3. `npm run test:all` — run full test suite (unit + integration)
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## Community
|
|
327
|
+
|
|
328
|
+
Have questions or want to discuss mini program monitoring? Join our community.
|
|
329
|
+
|
|
330
|
+
Due to WeChat group QR code expiration (7-day limit), please add the author on WeChat (**note: sentry-miniapp**) to be invited to the group:
|
|
331
|
+
|
|
332
|
+
<img src="docs/qrcode/zhiyao.jpeg" alt="Author WeChat QR Code" width="200" style="border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);" />
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## License
|
|
337
|
+
|
|
338
|
+
[MIT](./LICENSE)
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Sentry Miniapp SDK
|
|
1
|
+
# Sentry Miniapp SDK — 小程序监控 SDK
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|

|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|

|
|
8
8
|

|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
简体中文 | [English](./README.en.md)
|
|
11
|
+
|
|
12
|
+
一个基于 `@sentry/core` (v10.45.0) 核心构建的**小程序监控 SDK**,提供**异常监控**、**性能监控**、离线缓存、分布式追踪等能力。支持微信、支付宝、字节跳动、百度、QQ、钉钉、快手等多端小程序及 Taro / uni-app 等跨端框架。
|
|
11
13
|
|
|
12
14
|
> **💡 版本说明**
|
|
13
15
|
>
|
|
@@ -163,26 +165,45 @@ Sentry.addPerformanceMark('api-request-end');
|
|
|
163
165
|
Sentry.measurePerformance('fetch-user-data', 'api-request-start', 'api-request-end');
|
|
164
166
|
```
|
|
165
167
|
|
|
166
|
-
|
|
168
|
+
### 动态采样 (tracesSampler)
|
|
167
169
|
|
|
168
|
-
|
|
170
|
+
除了全局 `sampleRate`,你还可以通过 `tracesSampler` 回调实现按页面、按场景的精细化采样控制:
|
|
169
171
|
|
|
170
|
-
|
|
172
|
+
```javascript
|
|
173
|
+
Sentry.init({
|
|
174
|
+
dsn: '...',
|
|
175
|
+
tracesSampler: ({ name, inheritOrSampleWith }) => {
|
|
176
|
+
// 核心页面 100% 采样
|
|
177
|
+
if (name.includes('pages/index') || name.includes('pages/pay')) {
|
|
178
|
+
return 1;
|
|
179
|
+
}
|
|
180
|
+
// 低优先级页面降低采样率
|
|
181
|
+
if (name.includes('pages/about') || name.includes('pages/settings')) {
|
|
182
|
+
return 0.1;
|
|
183
|
+
}
|
|
184
|
+
// 继承上游采样决策,或使用默认 50% 采样率
|
|
185
|
+
return inheritOrSampleWith(0.5);
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
```
|
|
171
189
|
|
|
172
|
-
|
|
173
|
-
只要在 `Sentry.init` 时开启了 `enableSourceMap: true`(默认开启),SDK 会在报错时自动拦截并抹平各平台的虚拟路径,统一替换为标准前缀 `app:///`。
|
|
190
|
+
> **注意:** 设置 `tracesSampler` 后,`tracesSampleRate` 将被忽略。`tracesSampler` 的优先级更高。
|
|
174
191
|
|
|
175
|
-
|
|
192
|
+
---
|
|
176
193
|
|
|
177
|
-
|
|
194
|
+
## 🗺️ Source Map 支持与配置
|
|
195
|
+
|
|
196
|
+
SDK 内置了多端堆栈路径归一化能力(`enableSourceMap: true`,默认开启),自动将各平台虚拟路径转换为统一的 `app:///` 前缀,配合 sentry-cli 即可实现 Source Map 解析。
|
|
197
|
+
|
|
198
|
+
**快速上传示例:**
|
|
178
199
|
|
|
179
200
|
```bash
|
|
180
|
-
sentry-cli releases files
|
|
181
|
-
--url-prefix
|
|
182
|
-
--ext
|
|
201
|
+
sentry-cli releases files “my-miniapp@1.0.0” upload-sourcemaps ./dist \
|
|
202
|
+
--url-prefix “app:///” \
|
|
203
|
+
--ext js --ext map
|
|
183
204
|
```
|
|
184
205
|
|
|
185
|
-
|
|
206
|
+
> 详细的端到端配置指南(包括各构建工具配置、CI/CD 集成、验证与排查),请参阅 **[Source Map 完整配置指南](./docs/SOURCEMAP_GUIDE.md)**。
|
|
186
207
|
|
|
187
208
|
---
|
|
188
209
|
|
|
@@ -291,6 +312,18 @@ Sentry 官方的 Replay 功能强依赖于浏览器标准 DOM 环境(通过 rr
|
|
|
291
312
|
|
|
292
313
|
---
|
|
293
314
|
|
|
315
|
+
## 📖 文档导航
|
|
316
|
+
|
|
317
|
+
| 文档 | 说明 |
|
|
318
|
+
|------|------|
|
|
319
|
+
| [Source Map 完整配置指南](./docs/SOURCEMAP_GUIDE.md) | 端到端 Source Map 配置,覆盖各构建工具、CI/CD 集成、验证与排查 |
|
|
320
|
+
| [多端兼容性报告](./docs/MultiPlatformCompatibilityReport.md) | 各小程序平台 API 兼容性矩阵与差异说明 |
|
|
321
|
+
| [示例项目](./examples/wxapp/) | 微信小程序完整接入示例 |
|
|
322
|
+
| [开发指南](./DEVELOPMENT.md) | 本地开发环境搭建与调试 |
|
|
323
|
+
| [贡献指南](./CONTRIBUTING.md) | 如何参与项目贡献 |
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
294
327
|
## 🤝 参与贡献
|
|
295
328
|
|
|
296
329
|
我们非常欢迎开发者提交 `Pull Request` 或通过 `Issues` 提出宝贵意见!
|