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

fix(Assets) enqueue the minified version of a package if available #2096

Closed
wants to merge 4 commits into from

Conversation

lucatume
Copy link
Contributor

@lucatume lucatume commented Jun 5, 2024

This PR fixes an issue where the Tribe__Assets::register() method would not correctly register the minified version of assets.

This is a follow-up fix to the work done in #2093.

The minified version of the files will be loaded if:

  1. The non-minified version of the file does not exist; this is the case for vendor files whose non-minified version will not be included in the plugin package.
  2. The SCRIPT_DEBUG constant is not set or set to false indicating that, where possible, the minified version of the files should be loaded.

@lucatume lucatume self-assigned this Jun 5, 2024
src/Tribe/Assets.php Show resolved Hide resolved
src/Tribe/Assets.php Show resolved Hide resolved
src/Tribe/Assets.php Outdated Show resolved Hide resolved
src/Tribe/Assets.php Outdated Show resolved Hide resolved
src/Tribe/Assets.php Outdated Show resolved Hide resolved
@lucatume lucatume marked this pull request as ready for review June 5, 2024 12:32
@lucatume
Copy link
Contributor Author

lucatume commented Jun 5, 2024

Closing this as a duplicate of this PR on stellarwp/assets.

@lucatume lucatume closed this Jun 5, 2024
@bordoni bordoni deleted the fix/minified-assets-location branch July 25, 2024 15:09
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.

2 participants