ReferenceError: require is not defined

前端 未结 1 397
无人共我
无人共我 2021-01-04 23:03

I\'m currently working on a Mozilla Firefox addon.

I have set up a panel and attached a content script to it. I need to communicate between the content scripts and

相关标签:
1条回答
  • 2021-01-04 23:41

    Content scripts do not have access to require. Instead self is already declared.

    Just remove the require line from popup.js (but not main.js).

    See Communicating using "port".

    0 讨论(0)
提交回复
热议问题