Skip to content

Commit

Permalink
chore: get version and manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickJS committed May 13, 2024
1 parent 2ac2a2f commit d302305
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/qwik/src/qwikloader.ts
Expand Up @@ -96,7 +96,8 @@ export const qwikLoader = (
if (attrValue) {
const container = element.closest('[q\\:container]')! as QContainerElement;
const base = new URL(container[getAttribute]('q:base')!, doc.baseURI);
const manifest = container[getAttribute]('q:manifest-hash')
const qVersion = container[getAttribute]('q:version') || 'unknown';
const qManifest = container[getAttribute]('q:manifest-hash') || 'dev';
for (const qrl of attrValue.split('\n')) {
const url = new URL(qrl, base);
const href = url.href;
Expand Down Expand Up @@ -130,7 +131,8 @@ export const qwikLoader = (
importError,
error,
symbol,
manifest,
qManifest,
qVersion,
href,
};
emitEvent('qerror', eventData);
Expand All @@ -139,7 +141,7 @@ export const qwikLoader = (
}
const previousCtx = doc[Q_CONTEXT];
if (element[isConnected]) {
const eventData = { manifest, href, symbol, element, reqTime };
const eventData = { qManifest, qVersion, href, symbol, element, reqTime };
try {
doc[Q_CONTEXT] = [element, ev, url];
isSync || emitEvent<QwikSymbolEvent>('qsymbol', eventData);
Expand Down

0 comments on commit d302305

Please sign in to comment.