I am creating a Chrome extension and compiling it using closure compiler, specifically tscc
When I compile the code it's converting chrome.tabs.executeScript() into chrome.b.a() and causing it to throw the error
Uncaught (in promise) TypeError: Cannot read property 'a' of undefined
How do I prevent this from happening?
tscc.spec.json
{
"modules": {
"out": "src/background.ts"
},
"compilerFlags": {
"language_out": "ECMASCRIPT_2019"
},
"external": {
"chrome_extensions": "chrome"
},
"prefix": "dist/"
}