Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Esbuild IIFE doesn't export a global name #24

Open
fasiha opened this issue Jan 30, 2023 · 0 comments
Open

Esbuild IIFE doesn't export a global name #24

fasiha opened this issue Jan 30, 2023 · 0 comments

Comments

@fasiha
Copy link
Owner

fasiha commented Jan 30, 2023

Need to use https://esbuild.github.io/api/#global-name somewhere in

mudderjs/esbuild.mjs

Lines 5 to 11 in d83942d

await build({
entryPoints: ["index.js"],
outfile: "dist/mudder.min.js",
sourcemap: true,
minify: true,
format: "iife",
});

Discovered this by putting <script src="mudder.min.js"></script> in a HTML file and copying the JS and source map to the same directory and realizing nothing in it was exporting a mudder top-level global variable, oops.

Also cf., #18.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant