Packages

@rrweb/record

2.2.0 · 24 Oct 2026MIT1.1M / weekRepositoryHomepagenpmAtom feed

Your version

2.0.0

major1 Jun 2026Where it was published

2.2.0 is the newest release of 2.x.

In short

3 breaking1 new7 fixed3 internal

  • breaking

    BREAKING CHANGE (as above): Rename UMD global names from rrweb to rrwebRecord for the recorder and rrwebReplay for the replayer. This avoids conflicts when both are loaded on the same page.

  • breaking

    Distributed files have new filenames, paths and extensions. Important: If you reference distributed files or types directly, you might have to update your paths/filenames. E.g. you import from rrweb/typings/... or rrdom/es. However you run import rrweb from 'rrweb' you won't notice a difference with this change. If you include rrweb files directly in a script tag, you might have to update that path to include a the .umd.cjs files instead. All .js files now use ES modules which can be used in modern browsers, node.js and bundlers that support ES modules. All npm packages now also ship .cjs and .umd.cjs files. The .umd.cjs files are CommonJS modules that bundle all files together to make it easy to ship one file to browser environments (similar to the previous .js files). The .cjs files are CommonJS modules that can be used in older Node.js environments. Types should be better defined in package.json and if you need specific types they might be exported from new packages (for example PlayerMachineState and SpeedMachineState are now exported from @rrweb/replay). Check the package.json's main and exports field for the available files.

  • breaking

    Remove the rrweb-all.js, rrweb-record.js, and rrweb-replay.js files from rrweb package. Now you can use @rrweb/all, @rrweb/record, and @rrweb/replay packages instead. Check out the README of each package for more information or check out PR #1033 to see the changes.

Release note

Breaking change for <script> based usage (vs. 2.0.0-alpha.X)

While the record package was not available in 1.x, the rrweb-record.js script was available as a separate build output,
using a rrwebRecord global.

During the alpha process, the build output changed to UMD format and the global underwent a shift to rrweb.record and back again to rrwebRecord.record for the final 2.0.0 release. If you were previously using a 2.0 alpha version of the record package, you will need to use the rrwebRecord global instead of rrweb, and if using jsdelivr, need to use the 'umd' folder instead of 'dist':

<script src="https://cdn.jsdelivr.net/npm/@rrweb/record@2.0.0/umd/record.js">
<script>
  rrwebRecord.record(...options)
</script>

Note: the recommended approach is now to use ES Modules as outlined in our docs.

Major Changes

  • breaking

    BREAKING CHANGE (as above): Rename UMD global names from rrweb to rrwebRecord for the recorder and rrwebReplay for the replayer. This avoids conflicts when both are loaded on the same page.

  • breaking

    Distributed files have new filenames, paths and extensions. Important: If you reference distributed files or types directly, you might have to update your paths/filenames. E.g. you import from rrweb/typings/... or rrdom/es. However you run import rrweb from 'rrweb' you won't notice a difference with this change. If you include rrweb files directly in a script tag, you might have to update that path to include a the .umd.cjs files instead. All .js files now use ES modules which can be used in modern browsers, node.js and bundlers that support ES modules. All npm packages now also ship .cjs and .umd.cjs files. The .umd.cjs files are CommonJS modules that bundle all files together to make it easy to ship one file to browser environments (similar to the previous .js files). The .cjs files are CommonJS modules that can be used in older Node.js environments. Types should be better defined in package.json and if you need specific types they might be exported from new packages (for example PlayerMachineState and SpeedMachineState are now exported from @rrweb/replay). Check the package.json's main and exports field for the available files.

  • breaking

    Remove the rrweb-all.js, rrweb-record.js, and rrweb-replay.js files from rrweb package. Now you can use @rrweb/all, @rrweb/record, and @rrweb/replay packages instead. Check out the README of each package for more information or check out PR #1033 to see the changes.

Patch Changes

  • Keep package version in sync with other packages

  • Drop base64 inlined worker source from all bundles

  • Added support for deprecated addRule & removeRule methods

  • Validate if WebGLRenderingContext exists before capturing it

  • Move patch function into @rrweb/utils to improve bundling

  • Correctly detect when angular has wrapped mutation observer

  • Tree-shake replay-only postcss code from the @rrweb/record bundle.

  • Provide a /umd/ output folder alongside the /dist/ one so that we can serve UMD (Universal Module Definition) files with a .js extension, without upsetting expectations set by package.json that all .js files in /dist/ are modules