Skip to content

Commit

Permalink
Merge pull request #88 from moonlight-mod/notnite/iife
Browse files Browse the repository at this point in the history
build: Use an IIFE where possible
  • Loading branch information
NotNite authored Oct 8, 2024
2 parents 0df5611 + 2d1ae0b commit 8ebc44b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ async function build(name, entry) {
entryPoints: [entry],
outfile,

format: "cjs",
format: "iife",
globalName: "module.exports",

platform: ["web-preload", "browser"].includes(name) ? "browser" : "node",

treeShaking: true,
Expand Down Expand Up @@ -256,7 +258,8 @@ async function buildExt(ext, side, copyManifest, fileExt) {
entryPoints,
outdir,

format: "cjs",
format: "iife",
globalName: "module.exports",
platform: "node",

treeShaking: true,
Expand Down

0 comments on commit 8ebc44b

Please sign in to comment.