|
1 | 1 | import { version } from 'rrweb/package.json'
|
2 |
| - |
3 |
| -// Same as loader-globals.ts except includes rrweb2 scripts. |
4 |
| -// eslint-disable-next-line @typescript-eslint/ban-ts-comment |
5 |
| -// @ts-ignore |
6 |
| -import rrwebRecord from 'rrweb/es/rrweb/packages/rrweb/src/record' |
7 |
| -// eslint-disable-next-line @typescript-eslint/ban-ts-comment |
8 |
| -// @ts-ignore |
9 |
| -import { getRecordConsolePlugin } from 'rrweb/es/rrweb/packages/rrweb/src/plugins/console/record' |
| 2 | +import { getRecordConsolePlugin, record } from 'rrweb' |
10 | 3 |
|
11 | 4 | // rrweb/network@1 code starts
|
12 | 5 | // most of what is below here will be removed when rrweb release their code for this
|
@@ -676,15 +669,15 @@ export const getRecordNetworkPlugin: (options?: NetworkRecordOptions) => RecordP
|
676 | 669 |
|
677 | 670 | assignableWindow.__PosthogExtensions__ = assignableWindow.__PosthogExtensions__ || {}
|
678 | 671 | assignableWindow.__PosthogExtensions__.rrwebPlugins = { getRecordConsolePlugin, getRecordNetworkPlugin }
|
679 |
| -assignableWindow.__PosthogExtensions__.rrweb = { record: rrwebRecord, version: 'v2', rrwebVersion: version } |
| 672 | +assignableWindow.__PosthogExtensions__.rrweb = { record: record, version: 'v2', rrwebVersion: version } |
680 | 673 |
|
681 | 674 | // we used to put all of these items directly on window, and now we put it on __PosthogExtensions__
|
682 | 675 | // but that means that old clients which lazily load this extension are looking in the wrong place
|
683 | 676 | // yuck,
|
684 | 677 | // so we also put them directly on the window
|
685 | 678 | // when 1.161.1 is the oldest version seen in production we can remove this
|
686 |
| -assignableWindow.rrweb = { record: rrwebRecord, version: 'v2', rrwebVersion: version } |
| 679 | +assignableWindow.rrweb = { record: record, version: 'v2', rrwebVersion: version } |
687 | 680 | assignableWindow.rrwebConsoleRecord = { getRecordConsolePlugin }
|
688 | 681 | assignableWindow.getRecordNetworkPlugin = getRecordNetworkPlugin
|
689 | 682 |
|
690 |
| -export default rrwebRecord |
| 683 | +export default record |
0 commit comments