-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add AmpBoilerplateErrorHandler transformer #1195
Add AmpBoilerplateErrorHandler transformer #1195
Conversation
@sebastianbenz I don't know enough about the JS DOM abstraction to solve that. Any ideas on how to ensure no whitespace is added? |
The transformer is fine, we run a code formatter after the transformations (for readability) which adds the whitespace. You have to disable this, by adding
You'll also have to run |
4054038
to
f632431
Compare
The CLA check seems to be stuck here... |
When disabling the beautify on scripts, it not only leaves the internals of each script tag intact, but it also removes the newlines between the individual elements. Is there a way to avoid styling the script internals, but keep the newlines outside of the script element intact? |
Not sure if that's configurable. I don't consider this a critical problem. |
This PR adds a transformer that adds a
<script amp-onerror>
element to the document head to disable the boilerplate early on errors while loading the AMP runtime.Fixes #1146