@rrweb/record
2.2.0 · 24 Oct 2026MIT1.1M / weekRepositoryHomepagenpmAtom feed
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
rrwebtorrwebRecordfor the recorder andrrwebReplayfor 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/...orrrdom/es. However you runimport 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.cjsfiles instead. All.jsfiles 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.cjsand.umd.cjsfiles. The.umd.cjsfiles are CommonJS modules that bundle all files together to make it easy to ship one file to browser environments (similar to the previous.jsfiles). The.cjsfiles are CommonJS modules that can be used in older Node.js environments. Types should be better defined inpackage.jsonand if you need specific types they might be exported from new packages (for examplePlayerMachineStateandSpeedMachineStateare now exported from@rrweb/replay). Check thepackage.json'smainandexportsfield for the available files. - breaking
Remove the rrweb-all.js, rrweb-record.js, and rrweb-replay.js files from
rrwebpackage. Now you can use@rrweb/all,@rrweb/record, and@rrweb/replaypackages 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
rrwebtorrwebRecordfor the recorder andrrwebReplayfor 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/...orrrdom/es. However you runimport 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.cjsfiles instead. All.jsfiles 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.cjsand.umd.cjsfiles. The.umd.cjsfiles are CommonJS modules that bundle all files together to make it easy to ship one file to browser environments (similar to the previous.jsfiles). The.cjsfiles are CommonJS modules that can be used in older Node.js environments. Types should be better defined inpackage.jsonand if you need specific types they might be exported from new packages (for examplePlayerMachineStateandSpeedMachineStateare now exported from@rrweb/replay). Check thepackage.json'smainandexportsfield for the available files. - breaking
Remove the rrweb-all.js, rrweb-record.js, and rrweb-replay.js files from
rrwebpackage. Now you can use@rrweb/all,@rrweb/record, and@rrweb/replaypackages 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
postcsscode from the@rrweb/recordbundle.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