I am creating an extension for Firefox using JPM. In the package.json file, we have this line for the entry point...
"main": "index.js"
How do I change it, or what else can I do, to include more JS files in my extension? I am basically porting a Chrome extension where I have 2-3 JS files.
I tried the following, but it didn't work.
"main": ["index.js", "file2.js"]
"main": [{"index.js", "file2.js"}]
"main": "index.js,file2.js"
To clarify a bit more, both of these files are meant to run in the background and are not content scripts.
As far as I know, through the
package.json
file you can specify only onemain.js
script .As the developers' documentation says:
So, you can create your own library in the
lib
directory, let's saytest.js
following the documentation and included to yourmain.js
. Take a look at an example of this:test.js:
and in your main.js: