Skip to content

[Issue] Prevent leaking of variables to global scope #28110

Closed
@ghost

Description

This issue is automatically created based on existing pull request: #27622: Prevent leaking of variables to global scope


Description (*)

This PR adjusts minification file resolver for RequreJS that is generated to prevent leaking of variables it uses to global scope.

Preconditions (*)

Steps to reproduce (*)

  1. Enable JS minification https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html

Expected Result (*)

  1. JavaScript minification still works properly and correct .min.js files are requested.
  2. There is no ctx, origNameToUrl and baseUrl variables under window leaked.

Actual result (*)

  1. [Screenshots, logs or description]

Metadata

Metadata

Assignees

Labels

Component: RequireJsFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P2A defect with this priority could have functionality issues which are not to expectations.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Triage: DoneHas been reviewed and prioritized during Triage with Product Managers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions