As I was looking around how to fix the problem for quiet a while and did not find my solution anywhere:
There is also the option to set "type": "module"
for a background script as described here: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background
so in manifest.json
it would be as follows:
"background": {
"scripts": ["background.js"],
"type": "module"
}