Closed paularah closed 1 year ago
Putting /*global chrome*/
at the beginning of the file temporarily resolves this. But this should be baked into the project by default.
If /*global chrome*/
fixes it, this is an ESLint error, and not a browser error. Try adding webextensions:true
to .eslintrc.cjs
:
{
env: { browser: true, es2020: true, webextensions: true },
// rest of config...
}
Thanks 🙏
Build tool
Vite
Where do you see the problem?
Describe the bug
Chrome is always undefined inside the content script, so I cannot use any Chrome extension APIs. This is straight from the example in the docs. Maybe I might be missing something?
Reproduction
https://github.com/paularah/crjs
Logs
System Info
Severity
blocking all usage of RPCE