Skip to content
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

Update key assets with preload headers #2261

Merged
merged 1 commit into from Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add logic to collect Product Details data and send it to the BC App stencil template through custom event [#2270](https://github.com/bigcommerce/cornerstone/pull/2270)
- Allow quantity of "0" in cart to remove item [#2266](https://github.com/bigcommerce/cornerstone/pull/2266)
- Fix the issue with getting product details data if the product details form is valid on page load [#2271](https://github.com/bigcommerce/cornerstone/pull/2271)
- - Update key render-blocking resources to be preloaded via HTTP headers/Early Hints [#2261](https://github.com/bigcommerce/cornerstone/pull/2261)


## 6.6.1 (09-14-2022)

Expand Down
10 changes: 3 additions & 7 deletions templates/layout/base.html
Expand Up @@ -24,12 +24,11 @@
window.lazySizesConfig = window.lazySizesConfig || {};
window.lazySizesConfig.loadMode = 1;
</script>
<script async src="{{cdn 'assets/dist/theme-bundle.head_async.js'}}"></script>
<script async src="{{cdn 'assets/dist/theme-bundle.head_async.js' resourceHint='preload' as='script'}}"></script>
bookernath marked this conversation as resolved.
Show resolved Hide resolved

{{getFontsCollection font-display='block'}}

<link rel="preload" href="{{cdn 'assets/dist/theme-bundle.font.js'}}" as="script">
bookernath marked this conversation as resolved.
Show resolved Hide resolved
<script async src="{{cdn 'assets/dist/theme-bundle.font.js'}}"></script>
<script async src="{{cdn 'assets/dist/theme-bundle.font.js' resourceHint='preload' as='script'}}"></script>

{{{stylesheet '/assets/css/theme.css'}}}

Expand All @@ -48,9 +47,6 @@
{{~inject 'carouselArrowAndDotAriaLabel' (lang 'carousel.arrow_and_dot_aria_label')}}
{{~inject 'carouselActiveDotAriaLabel' (lang 'carousel.active_dot_aria_label')}}
{{~inject 'carouselContentAnnounceMessage' (lang 'carousel.content_announce_message')}}

{{!-- Get this loading ASAP --}}
<link rel="preload" href="{{cdn 'assets/dist/theme-bundle.main.js'}}" as="script">
bookernath marked this conversation as resolved.
Show resolved Hide resolved
</head>
<body>
<svg data-src="{{cdn 'img/icon-sprite.svg'}}" class="icons-svg-sprite"></svg>
Expand All @@ -66,7 +62,7 @@
window.stencilBootstrap("{{page_type}}", {{jsContext}}).load();
}
</script>
<script async defer src="{{cdn 'assets/dist/theme-bundle.main.js'}}" onload="onThemeBundleMain()"></script>
<script async defer src="{{cdn 'assets/dist/theme-bundle.main.js' resourceHint='preload' as='script'}}" onload="onThemeBundleMain()"></script>

{{{footer.scripts}}}
</body>
Expand Down