Files
wxt/templates/virtual-background.ts
T
2023-06-25 10:53:35 -05:00

14 lines
319 B
TypeScript

import definition from '{{moduleId}}';
try {
const res = definition.main();
if (res instanceof Promise) {
console.warn(
"The background's main() function return a promise, but it must be synchonous",
);
}
} catch (err) {
console.error('The background script crashed on startup!');
throw err;
}