Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Rewrite Static Asset References to ESI #281

Merged
merged 6 commits into from
Apr 30, 2019
Merged

Rewrite Static Asset References to ESI #281

merged 6 commits into from
Apr 30, 2019

Conversation

trieloff
Copy link
Contributor

@trieloff trieloff commented Apr 24, 2019

Partial implementation of #224, but depends on:

Also fixes #285

The `script.js.esi` or `style.css.esi` resource will be replaced with a long-cacheable URL

implements #267
…ide stable URLs

When run in production, all `<script src>` and `<link href>` references pointing to external assets will be rewritten to become ESI includes of the same URL, with an added extension that can be resolved into a stable URL

Fixes #224
@codecov
Copy link

codecov bot commented Apr 24, 2019

Codecov Report

Merging #281 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #281   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          42     45    +3     
  Lines         916    949   +33     
=====================================
+ Hits          916    949   +33
Impacted Files Coverage Δ
src/html/static-asset-links.js 100% <100%> (ø)
src/html/html-to-hast.js 100% <100%> (ø)
src/defaults/html.pipe.js 100% <100%> (ø) ⬆️
src/html/stringify-hast.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c73e7bb...a936918. Read the comment docs.

HTML response bodies will now be parsed and then serialized before the final response is created. This creates the opportunity of changing the HTML AST for HTML-post-processing

Fixes #285
trieloff added a commit to adobe/helix-cli that referenced this pull request Apr 29, 2019
@trieloff trieloff mentioned this pull request Apr 29, 2019
@trieloff trieloff merged commit efd26e3 into master Apr 30, 2019
@adobe-bot
Copy link

🎉 This PR is included in version 1.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@tripodsan tripodsan deleted the static-asset-esi branch July 18, 2019 01:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce context.response.hast?
2 participants