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

chore: start the experiment with modulepreload on qwik.dev #6862

Merged
merged 1 commit into from
Sep 5, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/docs/src/entry.ssr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,16 @@ export default function (opts: RenderToStreamOptions) {
lang: 'en',
...opts.containerAttributes,
},
// Core Web Vitals experiment until October 1: Do not remove and do not bring back any SW until then! Reach out to @maiieul first if you believe you have a good reason to change this.
prefetchStrategy: {
implementation: {
linkInsert: 'html-append',
linkRel: 'modulepreload',
},
},
// Core Web Vitals experiment until October 1: Do not remove and do not bring back any SW until then! Reach out to @maiieul first if you believe you have a good reason to change this.
qwikPrefetchServiceWorker: {
include: false,
},
});
}
6 changes: 4 additions & 2 deletions packages/docs/src/root.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { component$, useContextProvider, useStore } from '@builder.io/qwik';
import { QwikCityProvider, RouterOutlet, ServiceWorkerRegister } from '@builder.io/qwik-city';
import { QwikCityProvider, RouterOutlet } from '@builder.io/qwik-city';
import RealMetricsOptimization from './components/real-metrics-optimization/real-metrics-optimization';
import { RouterHead } from './components/router-head/router-head';
import { GlobalStore, type SiteStore } from './context';
Expand Down Expand Up @@ -54,7 +54,8 @@ export default component$(() => {
<meta charset="utf-8" />
<script dangerouslySetInnerHTML={uwu} />
<RouterHead />
<ServiceWorkerRegister />
{/* Core Web Vitals experiment until October 1: Do not bring back any SW until then! Reach out to @maiieul first if you believe you have a good reason to change this. */}
{/* <ServiceWorkerRegister /> */}
{/* <script dangerouslySetInnerHTML={`(${collectSymbols})()`} /> */}
<Insights publicApiKey={import.meta.env.PUBLIC_QWIK_INSIGHTS_KEY} />
</head>
Expand All @@ -66,6 +67,7 @@ export default component$(() => {
>
<RouterOutlet />
<RealMetricsOptimization builderApiKey={BUILDER_PUBLIC_API_KEY} />
{/* Core Web Vitals experiment until October 1: Do not bring back any SW until then! Reach out to @maiieul first if you believe you have a good reason to change this. */}
</body>
</QwikCityProvider>
);
Expand Down