-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Preflight Checklist
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
What package is this bug report for?
Other (specify below)
Version
@rrweb/rrweb-plugin-console-record: 2.0.0-alpha.18
Expected Behavior
I want to import and use the console recorder plugin, as it provides in the recipes:
import rrweb from 'rrweb';
import { getRecordConsolePlugin } from '@rrweb/rrweb-plugin-console-record';
rrweb.record({
emit: function emit(event) {
// you should use console.log in this way to avoid errors.
const defaultLog = console.log['__rrweb_original__']
? console.log['__rrweb_original__']
: console.log;
defaultLog(event);
},
// to use default record option
plugins: [getRecordConsolePlugin()],
});
Actual Behavior
All is well until I run my extension in the dev environment, I find that the content script doesn't run at all, possibly indicating a crash during the build process, perhaps some operation is being run within the package version that throws an error. My content script widget doesn't appear.
Steps to Reproduce
- Create an extension project
- Install @rrweb/rrweb-plugin-console-record: 2.0.0-alpha.18 as a dependency
- Use this in a content script
- Go to browser to see if it crashes
Testcase Gist URL
No response
Additional Information
I downgraded to version @rrweb/rrweb-plugin-console-record: 2.0.0-alpha.15, and my code is now working as expected.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working