Skip to content

Commit

Permalink
chore: change build outfile to addonRef.js
Browse files Browse the repository at this point in the history
  • Loading branch information
northword committed Jul 17, 2023
1 parent 229411a commit 9fd9849
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions addon/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async function startup({ id, version, resourceURI, rootURI }, reason) {
ctx._globalThis = ctx;

Services.scriptloader.loadSubScript(
`${rootURI}/chrome/content/scripts/index.js`,
`${rootURI}/chrome/content/scripts/__addonRef__.js`,
ctx,
);
}
Expand All @@ -111,7 +111,7 @@ function shutdown({ id, version, resourceURI, rootURI }, reason) {
.getService(Components.interfaces.nsIStringBundleService)
.flushBundles();

Cu.unload(`${rootURI}/chrome/content/scripts/index.js`);
Cu.unload(`${rootURI}/chrome/content/scripts/__addonRef__.js`);

if (chromeHandle) {
chromeHandle.destruct();
Expand Down
5 changes: 4 additions & 1 deletion scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ async function esbuild() {
},
bundle: true,
target: "firefox102",
outfile: path.join(buildDir, "addon/chrome/content/scripts/index.js"),
outfile: path.join(
buildDir,
`addon/chrome/content/scripts/${config.addonRef}.js`,
),
// Don't turn minify on
// minify: true,
}).catch(() => exit(1));
Expand Down

0 comments on commit 9fd9849

Please sign in to comment.