Open
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
aklinker1
requested changes
Feb 6, 2026
Member
aklinker1
left a comment
There was a problem hiding this comment.
- The
globalNameproperty is available on all entrypoints - should we restrict this to just content scripts and unlisted scripts in the type definitions?
Only content scripts and unlisted scripts are bundled as IIFEs, so this option is only relevant for them.
- Is there any benefit to having the
globalNameoption available for other entrypoint types?
No, for the above reason.
- How shall we indicate that the default value will switch to the behaviour of
falsein a future WXT version? Would this version change the generated output for other script types too (eg: background, popup), or will we leave them generating a named IIFE.
You don't need to indicate anything in this PR. For the PR that makes the breaking change, add a section to the PR explaining the change and migration path for people.
https://github.com/wxt-dev/wxt/blob/main/CONTRIBUTING.md#breaking-changes-policy
bdf5f89 to
ed53336
Compare
ed53336 to
e00a3d4
Compare
Author
|
Ready for another review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Implements #2004
The IIFE name is not currently configurable for content scripts and unlisted scripts. The variable name can be important when inserting scripts with world=MAIN or directly via a
<script>tag to ensure there is no conflict with an existing variable name on the page.This PR is a followup to the discussion in #1897 where we decided to add a
globalNameoption.Questions:
globalNameproperty is available on all entrypoints - should we restrict this to just content scripts and unlisted scripts in the type definitions?globalNameoption available for other entrypoint types?falsein a future WXT version? Would this version change the generated output for other script types too (eg: background, popup), or will we leave them generating a named IIFE.Manual Testing
Specify the
globalNameoption on a content script or unlisted script entrypoint and check the generated JS output matches what's expected for the given option.