Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Pass argument to IIFE #3722

Closed
reesericci opened this issue Apr 8, 2024 · 2 comments
Closed

Pass argument to IIFE #3722

reesericci opened this issue Apr 8, 2024 · 2 comments

Comments

@reesericci
Copy link

I would like to be able to pass an object from the global scope to the IIFE via an argument. For example:

(function (Scratch) {
	// do stuff
})(Scratch)

Is this possible to do with esbuild?

@evanw
Copy link
Owner

evanw commented Apr 10, 2024

You can do that by constructing an IIFE yourself with banner and footer.

@evanw
Copy link
Owner

evanw commented Apr 28, 2024

I'm closing this issue because this question has been answered.

@evanw evanw closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants