crossbuilder
crossbuilder copied to clipboard
where can I put code only to be executed in background?
I have auth code I'd like to run in the background script, but having trouble figuring out where to put it in the /app folder (trying to avoid modifying other folders if I can help it).
I've tried app/index.js
, but interestingly, in dev
mode, this file isn't even used--I can comment out the whole file and everything still runs fine.
Placing code in containers/Root.js
seems to result in the code being injected into the content script, so this isn't ideal either.
Is the only option to modify files in browser/extension/background
?
Thanks!
Yes, you can modify browser/extension/background/index.js
. Or have the code in a separate file and import it there.