Skip to content

feat: don't require build.lib.name for format iife#22378

Open
danon wants to merge 1 commit into
vitejs:mainfrom
danon:main
Open

feat: don't require build.lib.name for format iife#22378
danon wants to merge 1 commit into
vitejs:mainfrom
danon:main

Conversation

@danon
Copy link
Copy Markdown

@danon danon commented May 1, 2026

I don't understand why build.lib.name is currently required for iife format?

I understand that certain bundlers build IIFE like that:

var MyVariable = (() => {})();

But vite builds it like that:

(() => {})();

So that name is never used. It forces users to come up with some name that is not going to be used.

I checked my bundle output and I did Find all... searching for that name I used in the config nowhere to be found. Maybe it's just unnecessary for iife?

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

Successfully merging this pull request may close these issues.

1 participant