-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Use '.min' in filenames of already minified js files in the Swagger module so they aren't getting minified again in production, fixes #16927 - for Magento 2.3 #17627
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
Conversation
|
Hi @hostep. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
|
Hi @miguelbalparda, thank you for the review. |
|
@miguelbalparda: is it possible to put this on hold for a bit? I just thought of another way to fix this and the fix would be the same in 2.2 and 2.3 and is probably a better way of solving this than what I was currently suggesting. I'll try to have something ready within a few hours to see if it works. |
|
Definitely @hostep, thanks for the quick reply. Just let me know the next steps and I'l be happy to help. |
miguelbalparda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On hold for now, don't process.
…odule so they aren't getting minified again in production, fixes magento#16927 - for Magento 2.3
d15683f to
6aeec47
Compare
|
@miguelbalparda: I took a completely different approach now, I think it's a better solution and easier to maintain. I've amended my previous commit and force pushed my branch. I also updated the description and title in the opening post so it makes more sense with this new solution. Sorry for the mess! :) |
|
Hi @miguelbalparda, thank you for the review. |
|
Hi @hostep. Thank you for your contribution. |
Please: do not backport this PR to 2.2, the solution for 2.2
is different andalready exists: #17626Description
The Magento Swagger module contains already minified js files:
This PR marks them to not be minified again during static content deploy, because they get changed in a way that they are no longer valid JS.This PR renames them so they contain
.minand reference them as such from the layout xml file as well. This way they don't get minified again in production mode when minification is enabled.I've already gone ahead and created a fix for Magento 2.2 as well
, since the solution presented in here doesn't work on 2.2, this is due to #13687 which only exists in 2.3PR for Magento 2.2: #17626
Fixed Issues (if relevant)
Manual testing scenarios
2.3-developinstallation (using commit 05f9df7)bin/magento config:set dev/js/minify_files 1bin/magento deploy:mode:set productionUncaught SyntaxError: Invalid regular expression flag&Uncaught ReferenceError: SwaggerUIBundle is not definedContribution checklist