-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add MinifyHtml to list of default transformers #330
Conversation
@westonruter The minification of JSON is currently enabled by default. I've read through https://wordpress.org/support/topic/alexa-atrk_acct-id-slash-encoding-adding-backslash/, and as far as I can tell, there's nothing stating that the spacing was the issue, but rather the extra backslash. Therefore, I think we should be relatively safe to enable JSON modification for now. Thoughts? |
Transformer\RewriteAmpUrls::class, | ||
Transformer\ReorderHead::class, | ||
Transformer\OptimizeAmpBind::class, | ||
Transformer\MinifyHtml::class, |
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.
Not super obvious from the PR diff, but Transformer\MinifyHtml::class
is an addition here, whereas the rest was just adapted to make use of relative namespaces.
Does it but add slashes to JSON when reserializing after parsing? |
Apparently, it does: https://3v4l.org/ZdYA1#v8.0.9 😞 |
OK cool, and there's no risk that |
This enables HTML minification by default.
Currently, the
amp-script
minification logic is disabled by default, as it requires an external dependency:mck89/peast
.