docs: prefer minified CDN ESM assets#1875
Conversation
|
There was a problem hiding this comment.
Pull request overview
Updates the project’s “no-build / CDN ESM” documentation examples to prefer production-oriented minified ESM assets (.min.js) for rrweb recording, replay, and rrweb-player, while clarifying when the unminified .js versions are still useful.
Changes:
- Switch CDN ESM import examples from
*.jsto*.min.jsfor record, replay, and rrweb-player. - Update accompanying text to recommend
.min.jsfor production and.jsfor debugging. - Clarify that older pinned CDN versions may not have minified ESM assets available.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/rrweb/README.md | Updates ESM CDN import examples and adds guidance on minified vs unminified assets. |
| packages/rrweb-player/README.md | Updates rrweb-player ESM CDN import to .min.js and documents fallback/debug guidance. |
| packages/replay/README.md | Updates replay ESM CDN import to .min.js and adds version availability note. |
| packages/record/README.md | Updates record ESM CDN import to .min.js and adds version availability note. |
| guide.md | Updates “no-build” examples for record/replay/player to .min.js and adds production/debug guidance. |
| guide.zh_CN.md | Mirrors the same .min.js updates and guidance in the Chinese guide. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Bundle Size ChangesNo bundle size changes. |
| ```html | ||
| <script type="module"> | ||
| import { record } from 'https://cdn.rrweb.com/record/current/dist/record.js'; | ||
| import { record } from 'https://cdn.rrweb.com/record/current/dist/record.min.js'; |
There was a problem hiding this comment.
This file doesn't currently exist
| includes minified ESM, such as | ||
| `https://cdn.rrweb.com/record/<version>/dist/record.min.js`, for immutable | ||
| production URLs. Use `.min.js` for production; the unminified `.js` sibling | ||
| remains useful for debugging. Minified ESM assets are available only for CDN |
There was a problem hiding this comment.
Remove this note re. older pinned versions when we backfill the .min.js for older version
| `https://cdn.rrweb.com/replay/<version>/dist/replay.min.js`, for immutable | ||
| production URLs. Use `.min.js` for production; the unminified `.js` sibling | ||
| remains useful for debugging. Minified ESM assets are available only for CDN | ||
| versions published after the feature was introduced, so older pinned versions |
3fe06d5 to
5b52c71
Compare
Summary
Update no-build/browser CDN ESM examples to use the production-oriented
.min.jsassets for record, replay, and rrweb-player..jsto.min.js.jssiblings remain useful for debuggingNotes
This docs change assumes first-party CDN minified ESM assets are available for current and pinned CDN versions after the CDN backfill is completed.
Verification
git diff --checkrecord.js,replay.js, orrrweb-player.jsexamples where.min.jsis appropriateCould not run
yarn prettier --check ...in the fresh worktree because dependencies were not installed andprettierwas unavailable.