-
Notifications
You must be signed in to change notification settings - Fork 55
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
New transformer to convert ".js" to ".js?f=sxg" in script node values. #451
Conversation
Snapshot release v3
Merge master into release
Is there an issue describing what situation this is addressing? |
@honeybadgerdontcare I don't believe so. These are just part of a series of changes needed to make as part of preparing for a SxG build for AMP. |
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.
Thanks for this change! I haven't taken a look at the code in detail yet, but I think a few things need to be done before we can land this PR:
- Serve
.sxg.js
forv0
and all the extensions atcdn.ampproject.org
. (edit: solved with the change to?f=sxg
thought the contents are currently equal) - Change
cdn.ampproject.org
cache transformations to rewrite.sxg.js
back to.js
for serving in AMP Viewer (edit: solved with http://cl/324144375) - Change validator (either protoascii, or C++&JS) to allow these URLs in transformed AMP (edit: not yet solved)
There are enough users of the master
branch that I wouldn't want to introduce a known breakage.
@honeybadgerdontcare @banaag My understanding is that this is the next step in differential loading of JS beyond module/nomodule. They're planning to ship a version of the JS that has viewer integration code and post-module polyfills removed so it has a smaller footprint.
@xiexr151e It might be worth a quick doc to explain the problem/solution. That would more easily allow multiple threads of discussion, and serve as a unified location for the overall plan.
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.
Can someone point me to a doc explaining why we need .sxg.js
?
@twifkak @honeybadgerdontcare @jridgewell @erwinmombay @kevinkimball |
@xiexr151e can you update the subject of this PR as it seems obsolete |
also lets externalize our design document and link it here for posterity |
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.
Hi @xiexr151e! Thanks for the updates. Looks like 2 of the 3 blockers are solved, but this is still not valid transformed AMP. Those changes need to be made (and deployed within the Google AMP Cache) before we can merge this. Do you or @erwinmombay own the task of fixing the validator?
We jointly own this task, but I will be the primary assignee to the task. We are scheduled to begin the task next week. |
Derek Tse seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
going to close this. The SxG project is still on going but I will pick it up next quarter. and the code here is already obsolete |
This transformer will be used as part of creating the SxG build for AMP, based off of the module build.