Skip to content

docs: prefer minified CDN ESM assets#1875

Open
Juice10 wants to merge 1 commit into
rrweb-io:mainfrom
Juice10:codex/cdn-minified-esm-docs
Open

docs: prefer minified CDN ESM assets#1875
Juice10 wants to merge 1 commit into
rrweb-io:mainfrom
Juice10:codex/cdn-minified-esm-docs

Conversation

@Juice10

@Juice10 Juice10 commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

Update no-build/browser CDN ESM examples to use the production-oriented .min.js assets for record, replay, and rrweb-player.

  • switch first-party CDN ESM import examples from .js to .min.js
  • keep CSS URLs and UMD fallback examples unchanged
  • document that unminified .js siblings remain useful for debugging
  • use concrete exact-version examples because historical CDN versions are expected to be backfilled with minified ESM assets

Notes

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 --check
  • searched edited docs for stale older-version caveats and remaining direct CDN ESM record.js, replay.js, or rrweb-player.js examples where .min.js is appropriate
  • confirmed only the intended six docs files changed

Could not run yarn prettier --check ... in the fresh worktree because dependencies were not installed and prettier was unavailable.

Copilot AI review requested due to automatic review settings June 11, 2026 19:09
@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5b52c71

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 *.js to *.min.js for record, replay, and rrweb-player.
  • Update accompanying text to recommend .min.js for production and .js for 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.

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Changes

No bundle size changes.

Comment thread packages/record/README.md
```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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file doesn't currently exist

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread packages/record/README.md Outdated
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this note re. older pinned versions when we backfill the .min.js for older version

Comment thread packages/replay/README.md Outdated
`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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@Juice10 Juice10 force-pushed the codex/cdn-minified-esm-docs branch from 3fe06d5 to 5b52c71 Compare June 12, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants