@qwik.dev/core 2.0.0-beta.4 → 2.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/bindings/qwik.darwin-arm64.node +0 -0
  2. package/bindings/qwik.darwin-x64.node +0 -0
  3. package/bindings/qwik.linux-x64-gnu.node +0 -0
  4. package/bindings/qwik.win32-x64-msvc.node +0 -0
  5. package/bindings/qwik_wasm_bg.wasm +0 -0
  6. package/dist/build/package.json +1 -1
  7. package/dist/cli.cjs +2 -2
  8. package/dist/core-internal.d.ts +49 -11
  9. package/dist/core.cjs +239 -105
  10. package/dist/core.cjs.map +1 -1
  11. package/dist/core.min.mjs +1 -1
  12. package/dist/core.mjs +224 -105
  13. package/dist/core.mjs.map +1 -1
  14. package/dist/core.prod.cjs +117 -63
  15. package/dist/core.prod.mjs +113 -58
  16. package/dist/loader/package.json +1 -1
  17. package/dist/optimizer.cjs +138 -202
  18. package/dist/optimizer.d.ts +9 -15
  19. package/dist/optimizer.mjs +129 -195
  20. package/dist/server.cjs +34 -17
  21. package/dist/server.mjs +33 -17
  22. package/dist/starters/adapters/aws-lambda/adapters/aws-lambda/vite.config.mts +1 -1
  23. package/dist/starters/adapters/aws-lambda/src/entry_aws-lambda.tsx +1 -5
  24. package/dist/starters/adapters/azure-swa/adapters/azure-swa/vite.config.mts +1 -1
  25. package/dist/starters/adapters/azure-swa/src/entry.azure-swa.tsx +1 -2
  26. package/dist/starters/adapters/bun/adapters/bun/vite.config.mts +1 -1
  27. package/dist/starters/adapters/bun/src/entry.bun.ts +0 -2
  28. package/dist/starters/adapters/cloud-run/adapters/cloud-run/vite.config.mts +1 -1
  29. package/dist/starters/adapters/cloud-run/src/entry.cloud-run.tsx +0 -2
  30. package/dist/starters/adapters/cloudflare-pages/adapters/cloudflare-pages/vite.config.mts +1 -1
  31. package/dist/starters/adapters/cloudflare-pages/src/entry.cloudflare-pages.tsx +1 -2
  32. package/dist/starters/adapters/deno/adapters/deno/vite.config.mts +1 -1
  33. package/dist/starters/adapters/deno/src/entry.deno.ts +0 -2
  34. package/dist/starters/adapters/express/adapters/express/vite.config.mts +1 -1
  35. package/dist/starters/adapters/express/src/entry.express.tsx +0 -2
  36. package/dist/starters/adapters/fastify/adapters/fastify/vite.config.mts +1 -1
  37. package/dist/starters/adapters/fastify/src/plugins/fastify-qwik.ts +1 -2
  38. package/dist/starters/adapters/firebase/adapters/firebase/vite.config.mts +1 -1
  39. package/dist/starters/adapters/firebase/src/entry-firebase.tsx +1 -2
  40. package/dist/starters/adapters/netlify-edge/adapters/netlify-edge/vite.config.mts +1 -1
  41. package/dist/starters/adapters/netlify-edge/src/entry.netlify-edge.tsx +1 -2
  42. package/dist/starters/adapters/node-server/adapters/node-server/vite.config.mts +1 -1
  43. package/dist/starters/adapters/node-server/src/entry.node-server.tsx +0 -2
  44. package/dist/starters/adapters/{static/adapters/static → ssg/adapters/ssg}/vite.config.mts +2 -2
  45. package/dist/starters/adapters/ssg/package.json +19 -0
  46. package/dist/starters/adapters/vercel-edge/adapters/vercel-edge/vite.config.mts +1 -1
  47. package/dist/starters/adapters/vercel-edge/src/entry.vercel-edge.tsx +1 -2
  48. package/dist/starters/adapters/vercel-edge/vercel.json +1 -1
  49. package/dist/testing/index.cjs +184 -122
  50. package/dist/testing/index.mjs +177 -116
  51. package/dist/testing/package.json +1 -1
  52. package/package.json +2 -2
  53. package/dist/starters/adapters/static/package.json +0 -19
  54. /package/dist/starters/adapters/{static → ssg}/README.md +0 -0
@@ -7,7 +7,7 @@ export default extendConfig(baseConfig, () => {
7
7
  build: {
8
8
  ssr: true,
9
9
  rollupOptions: {
10
- input: ["src/entry.vercel-edge.tsx", "@qwik-router-config"],
10
+ input: ["src/entry.vercel-edge.tsx"],
11
11
  },
12
12
  outDir: ".vercel/output/functions/_qwik-router.func",
13
13
  },
@@ -7,7 +7,6 @@
7
7
  * - https://qwik.dev/docs/deployments/vercel-edge/
8
8
  *
9
9
  */
10
- import qwikRouterConfig from "@qwik-router-config";
11
10
  import {
12
11
  createQwikRouter,
13
12
  type PlatformVercel,
@@ -18,4 +17,4 @@ declare global {
18
17
  interface QwikRouterPlatform extends PlatformVercel {}
19
18
  }
20
19
 
21
- export default createQwikRouter({ render, qwikRouterConfig });
20
+ export default createQwikRouter({ render });
@@ -10,7 +10,7 @@
10
10
  ]
11
11
  },
12
12
  {
13
- "source": "/(assets|build)/.*",
13
+ "source": "/(assets|build)/(.*)",
14
14
  "headers": [
15
15
  {
16
16
  "key": "Cache-Control",
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/testing 2.0.0-beta.4-dev+9849dcf
3
+ * @qwik.dev/core/testing 2.0.0-beta.6-dev+c42693f
4
4
  * Copyright QwikDev. All Rights Reserved.
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
@@ -22259,6 +22259,9 @@ var isString = (v) => {
22259
22259
  var isFunction = (v) => {
22260
22260
  return typeof v === "function";
22261
22261
  };
22262
+ var isPrimitive = (v) => {
22263
+ return typeof v !== "object" && typeof v !== "function" && v !== null && v !== void 0;
22264
+ };
22262
22265
 
22263
22266
  // packages/qwik/src/core/shared/error/error.ts
22264
22267
  var codeToText = (code2, ...parts) => {
@@ -22490,6 +22493,8 @@ var QContainerSelector = "[q\\:container]:not([q\\:container=" + "html" /* HTML
22490
22493
  var HTML_NS = "http://www.w3.org/1999/xhtml";
22491
22494
  var SVG_NS = "http://www.w3.org/2000/svg";
22492
22495
  var MATH_NS = "http://www.w3.org/1998/Math/MathML";
22496
+ var XLINK_NS = "http://www.w3.org/1999/xlink";
22497
+ var XML_NS = "http://www.w3.org/XML/1998/namespace";
22493
22498
  var ResourceEvent = "qResource";
22494
22499
  var RenderEvent = "qRender";
22495
22500
  var TaskEvent = "qTask";
@@ -23285,6 +23290,59 @@ var inlinedQrl = (symbol, symbolName, lexicalScopeCapture = EMPTY_ARRAY) => {
23285
23290
  return createQRL(null, symbolName, symbol, null, null, lexicalScopeCapture);
23286
23291
  };
23287
23292
 
23293
+ // packages/qwik/src/core/client/util-mapArray.ts
23294
+ var mapApp_findIndx = (array, key, start) => {
23295
+ assertTrue(start % 2 === 0, "Expecting even number.");
23296
+ let bottom = start >> 1;
23297
+ let top = array.length - 2 >> 1;
23298
+ while (bottom <= top) {
23299
+ const mid = bottom + (top - bottom >> 1);
23300
+ const midKey = array[mid << 1];
23301
+ if (midKey === key) {
23302
+ return mid << 1;
23303
+ }
23304
+ if (midKey < key) {
23305
+ bottom = mid + 1;
23306
+ } else {
23307
+ top = mid - 1;
23308
+ }
23309
+ }
23310
+ return bottom << 1 ^ -1;
23311
+ };
23312
+ var mapArray_set = (array, key, value, start) => {
23313
+ const indx = mapApp_findIndx(array, key, start);
23314
+ if (indx >= 0) {
23315
+ if (value == null) {
23316
+ array.splice(indx, 2);
23317
+ } else {
23318
+ array[indx + 1] = value;
23319
+ }
23320
+ } else if (value != null) {
23321
+ array.splice(indx ^ -1, 0, key, value);
23322
+ }
23323
+ };
23324
+ var mapApp_remove = (array, key, start) => {
23325
+ const indx = mapApp_findIndx(array, key, start);
23326
+ let value = null;
23327
+ if (indx >= 0) {
23328
+ value = array[indx + 1];
23329
+ array.splice(indx, 2);
23330
+ return value;
23331
+ }
23332
+ return value;
23333
+ };
23334
+ var mapArray_get = (array, key, start) => {
23335
+ const indx = mapApp_findIndx(array, key, start);
23336
+ if (indx >= 0) {
23337
+ return array[indx + 1];
23338
+ } else {
23339
+ return null;
23340
+ }
23341
+ };
23342
+ var mapArray_has = (array, key, start) => {
23343
+ return mapApp_findIndx(array, key, start) >= 0;
23344
+ };
23345
+
23288
23346
  // packages/qwik/src/core/shared/utils/constants.ts
23289
23347
  var _CONST_PROPS = Symbol("CONST");
23290
23348
  var _VAR_PROPS = Symbol("VAR");
@@ -23899,59 +23957,6 @@ var addComponentStylePrefix = (styleId) => {
23899
23957
  return styleId || null;
23900
23958
  };
23901
23959
 
23902
- // packages/qwik/src/core/client/util-mapArray.ts
23903
- var mapApp_findIndx = (array, key, start) => {
23904
- assertTrue(start % 2 === 0, "Expecting even number.");
23905
- let bottom = start >> 1;
23906
- let top = array.length - 2 >> 1;
23907
- while (bottom <= top) {
23908
- const mid = bottom + (top - bottom >> 1);
23909
- const midKey = array[mid << 1];
23910
- if (midKey === key) {
23911
- return mid << 1;
23912
- }
23913
- if (midKey < key) {
23914
- bottom = mid + 1;
23915
- } else {
23916
- top = mid - 1;
23917
- }
23918
- }
23919
- return bottom << 1 ^ -1;
23920
- };
23921
- var mapArray_set = (array, key, value, start) => {
23922
- const indx = mapApp_findIndx(array, key, start);
23923
- if (indx >= 0) {
23924
- if (value == null) {
23925
- array.splice(indx, 2);
23926
- } else {
23927
- array[indx + 1] = value;
23928
- }
23929
- } else if (value != null) {
23930
- array.splice(indx ^ -1, 0, key, value);
23931
- }
23932
- };
23933
- var mapApp_remove = (array, key, start) => {
23934
- const indx = mapApp_findIndx(array, key, start);
23935
- let value = null;
23936
- if (indx >= 0) {
23937
- value = array[indx + 1];
23938
- array.splice(indx, 2);
23939
- return value;
23940
- }
23941
- return value;
23942
- };
23943
- var mapArray_get = (array, key, start) => {
23944
- const indx = mapApp_findIndx(array, key, start);
23945
- if (indx >= 0) {
23946
- return array[indx + 1];
23947
- } else {
23948
- return null;
23949
- }
23950
- };
23951
- var mapArray_has = (array, key, start) => {
23952
- return mapApp_findIndx(array, key, start) >= 0;
23953
- };
23954
-
23955
23960
  // packages/qwik/src/core/client/vnode-namespace.ts
23956
23961
  var import_build7 = require("@qwik.dev/core/build");
23957
23962
  var isForeignObjectElement = (elementName) => {
@@ -24125,6 +24130,24 @@ function getNewElementNamespaceData(domParentVNode, tagOrVNode) {
24125
24130
  elementNamespaceFlag
24126
24131
  };
24127
24132
  }
24133
+ function getAttributeNamespace(attributeName) {
24134
+ switch (attributeName) {
24135
+ case "xlink:href":
24136
+ case "xlink:actuate":
24137
+ case "xlink:arcrole":
24138
+ case "xlink:role":
24139
+ case "xlink:show":
24140
+ case "xlink:title":
24141
+ case "xlink:type":
24142
+ return XLINK_NS;
24143
+ case "xml:base":
24144
+ case "xml:lang":
24145
+ case "xml:space":
24146
+ return XML_NS;
24147
+ default:
24148
+ return null;
24149
+ }
24150
+ }
24128
24151
 
24129
24152
  // packages/qwik/src/core/shared/component-execution.ts
24130
24153
  var import_build8 = require("@qwik.dev/core/build");
@@ -24194,35 +24217,41 @@ var executeComponent = (container, renderHost, subscriptionHost, componentQRL, p
24194
24217
  return executeComponentWithPromiseExceptionRetry();
24195
24218
  };
24196
24219
  function addUseOnEvents(jsx3, useOnEvents) {
24197
- const jsxElement = findFirstStringJSX(jsx3);
24220
+ const jsxElement = findFirstElementNode(jsx3);
24198
24221
  let jsxResult = jsx3;
24222
+ const qVisibleEvent = "onQvisible$";
24199
24223
  return maybeThen(jsxElement, (jsxElement2) => {
24200
- let isInvisibleComponent = false;
24201
- if (!jsxElement2) {
24202
- isInvisibleComponent = true;
24203
- }
24224
+ const isHeadless = !jsxElement2;
24225
+ let placeholderElement = null;
24204
24226
  for (const key in useOnEvents) {
24205
24227
  if (Object.prototype.hasOwnProperty.call(useOnEvents, key)) {
24206
- if (isInvisibleComponent) {
24207
- if (key === "onQvisible$") {
24208
- const [jsxElement3, jsx4] = addScriptNodeForInvisibleComponents(jsxResult);
24209
- jsxResult = jsx4;
24210
- if (jsxElement3) {
24211
- addUseOnEvent(jsxElement3, "document:onQinit$", useOnEvents[key]);
24212
- }
24213
- } else if (key.startsWith("document:") || key.startsWith("window:")) {
24214
- const [jsxElement3, jsx4] = addScriptNodeForInvisibleComponents(jsxResult);
24215
- jsxResult = jsx4;
24216
- if (jsxElement3) {
24217
- addUseOnEvent(jsxElement3, key, useOnEvents[key]);
24218
- }
24219
- } else if (import_build8.isDev) {
24228
+ let targetElement = jsxElement2;
24229
+ let eventKey = key;
24230
+ if (isHeadless) {
24231
+ if (key === qVisibleEvent || key.startsWith("document:on" /* document */) || key.startsWith("window:on" /* window */)) {
24232
+ if (!placeholderElement) {
24233
+ const [createdElement, newJsx] = injectPlaceholderElement(jsxResult);
24234
+ jsxResult = newJsx;
24235
+ placeholderElement = createdElement;
24236
+ }
24237
+ targetElement = placeholderElement;
24238
+ } else {
24239
+ if (import_build8.isDev) {
24240
+ logWarn(
24241
+ 'You are trying to add an event "' + key + '" using `useOn` hook, but a node to which you can add an event is not found. Please make sure that the component has a valid element node. '
24242
+ );
24243
+ }
24244
+ continue;
24245
+ }
24246
+ }
24247
+ if (targetElement) {
24248
+ if (targetElement.type === "script" && key === qVisibleEvent) {
24249
+ eventKey = "document:onQinit$";
24220
24250
  logWarn(
24221
- 'You are trying to add an event "' + key + '" using `useOn` hook, but a node to which you can add an event is not found. Please make sure that the component has a valid element node. '
24251
+ 'You are trying to add an event "' + key + '" using `useVisibleTask$` hook, but a node to which you can add an event is not found. Using document:onQinit$ instead.'
24222
24252
  );
24223
24253
  }
24224
- } else if (jsxElement2) {
24225
- addUseOnEvent(jsxElement2, key, useOnEvents[key]);
24254
+ addUseOnEvent(targetElement, eventKey, useOnEvents[key]);
24226
24255
  }
24227
24256
  }
24228
24257
  }
@@ -24243,7 +24272,7 @@ function addUseOnEvent(jsxElement, key, value) {
24243
24272
  propValue.push(...value);
24244
24273
  props[key] = propValue;
24245
24274
  }
24246
- function findFirstStringJSX(jsx3) {
24275
+ function findFirstElementNode(jsx3) {
24247
24276
  const queue2 = [jsx3];
24248
24277
  while (queue2.length) {
24249
24278
  const jsx4 = queue2.shift();
@@ -24252,47 +24281,55 @@ function findFirstStringJSX(jsx3) {
24252
24281
  return jsx4;
24253
24282
  }
24254
24283
  queue2.push(jsx4.children);
24255
- } else if (Array.isArray(jsx4)) {
24284
+ } else if (isArray(jsx4)) {
24256
24285
  queue2.push(...jsx4);
24257
24286
  } else if (isPromise(jsx4)) {
24258
24287
  return maybeThen(
24259
24288
  jsx4,
24260
- (jsx5) => findFirstStringJSX(jsx5)
24289
+ (jsx5) => findFirstElementNode(jsx5)
24261
24290
  );
24262
24291
  } else if (isSignal(jsx4)) {
24263
- return findFirstStringJSX(untrack(() => jsx4.value));
24292
+ return findFirstElementNode(untrack(() => jsx4.value));
24264
24293
  }
24265
24294
  }
24266
24295
  return null;
24267
24296
  }
24268
- function addScriptNodeForInvisibleComponents(jsx3) {
24297
+ function injectPlaceholderElement(jsx3) {
24269
24298
  if (isJSXNode(jsx3)) {
24270
- const jsxElement = new JSXNodeImpl(
24271
- "script",
24272
- {},
24273
- {
24274
- type: "placeholder",
24275
- hidden: ""
24276
- },
24277
- null,
24278
- 3
24279
- );
24299
+ const placeholder = createPlaceholderScriptNode();
24280
24300
  if (jsx3.type === Slot) {
24281
- return [jsxElement, _jsxSorted(Fragment, null, null, [jsx3, jsxElement], 0, null)];
24301
+ return [placeholder, _jsxSorted(Fragment, null, null, [jsx3, placeholder], 0, null)];
24282
24302
  }
24283
24303
  if (jsx3.children == null) {
24284
- jsx3.children = jsxElement;
24285
- } else if (Array.isArray(jsx3.children)) {
24286
- jsx3.children.push(jsxElement);
24304
+ jsx3.children = placeholder;
24305
+ } else if (isArray(jsx3.children)) {
24306
+ jsx3.children.push(placeholder);
24287
24307
  } else {
24288
- jsx3.children = [jsx3.children, jsxElement];
24308
+ jsx3.children = [jsx3.children, placeholder];
24289
24309
  }
24290
- return [jsxElement, jsx3];
24291
- } else if (Array.isArray(jsx3) && jsx3.length) {
24292
- const [jsxElement, _] = addScriptNodeForInvisibleComponents(jsx3[0]);
24293
- return [jsxElement, jsx3];
24310
+ return [placeholder, jsx3];
24311
+ }
24312
+ if (isPrimitive(jsx3)) {
24313
+ const placeholder = createPlaceholderScriptNode();
24314
+ return [placeholder, _jsxSorted(Fragment, null, null, [jsx3, placeholder], 0, null)];
24315
+ }
24316
+ if (isArray(jsx3) && jsx3.length > 0) {
24317
+ const [createdElement, _] = injectPlaceholderElement(jsx3[0]);
24318
+ return [createdElement, jsx3];
24294
24319
  }
24295
- return [null, null];
24320
+ return [null, jsx3];
24321
+ }
24322
+ function createPlaceholderScriptNode() {
24323
+ return new JSXNodeImpl(
24324
+ "script",
24325
+ {},
24326
+ {
24327
+ type: "placeholder",
24328
+ hidden: ""
24329
+ },
24330
+ null,
24331
+ 3
24332
+ );
24296
24333
  }
24297
24334
 
24298
24335
  // packages/qwik/src/core/shared/utils/prop.ts
@@ -24882,6 +24919,13 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
24882
24919
  }
24883
24920
  value = serializeAttribute(key2, value, scopedStyleIdPrefix);
24884
24921
  if (value != null) {
24922
+ if (vNewNode[0 /* flags */] & 64 /* NS_svg */) {
24923
+ const namespace = getAttributeNamespace(key2);
24924
+ if (namespace) {
24925
+ element.setAttributeNS(namespace, key2, String(value));
24926
+ continue;
24927
+ }
24928
+ }
24885
24929
  element.setAttribute(key2, String(value));
24886
24930
  }
24887
24931
  }
@@ -26687,6 +26731,7 @@ var allocate = (container, typeId, value) => {
26687
26731
  case 11 /* RefVNode */:
26688
26732
  const vNode = retrieveVNodeOrDocument(container, value);
26689
26733
  if (vnode_isVNode(vNode)) {
26734
+ ensureMaterialized(vNode);
26690
26735
  return vnode_getNode(vNode);
26691
26736
  } else {
26692
26737
  throw qError(17 /* serializeErrorExpectedVNode */, [typeof vNode]);
@@ -31212,6 +31257,7 @@ var import_vitest3 = require("vitest");
31212
31257
 
31213
31258
  // packages/qwik/src/server/platform.ts
31214
31259
  var import_core3 = require("../core.cjs");
31260
+ var import_build14 = require("@qwik.dev/core/build");
31215
31261
 
31216
31262
  // packages/qwik/src/core/preloader/queue.ts
31217
31263
  var import_build13 = require("@qwik.dev/core/build");
@@ -31489,13 +31535,32 @@ if (import_build13.isBrowser) {
31489
31535
  }
31490
31536
 
31491
31537
  // packages/qwik/src/server/platform.ts
31538
+ var import_meta = {};
31539
+ var getDevSegmentPath = (mapper, hash3, symbolName, parent) => {
31540
+ const existing = mapper == null ? void 0 : mapper[hash3];
31541
+ if (existing) {
31542
+ return existing;
31543
+ }
31544
+ if (symbolName === SYNC_QRL) {
31545
+ return [symbolName, ""];
31546
+ }
31547
+ if (!parent) {
31548
+ if (symbolName.startsWith("_") && symbolName.length < 6) {
31549
+ return [symbolName, `${import_meta.env.BASE_URL}@qwik-handlers`];
31550
+ }
31551
+ console.error("qwik symbolMapper: unknown qrl requested without parent:", symbolName);
31552
+ return [symbolName, `${import_meta.env.BASE_URL}${symbolName}.js`];
31553
+ }
31554
+ const qrlFile = `${import_meta.env.BASE_URL}${parent.startsWith("/") ? parent.slice(1) : parent}_${symbolName}.js`;
31555
+ return [symbolName, qrlFile];
31556
+ };
31492
31557
  function createPlatform3(opts, resolvedManifest) {
31493
31558
  const mapper = resolvedManifest == null ? void 0 : resolvedManifest.mapper;
31494
31559
  const mapperFn = opts.symbolMapper ? opts.symbolMapper : (symbolName, _chunk, parent) => {
31495
31560
  var _a;
31496
- if (mapper) {
31561
+ if (mapper || import_build14.isDev && import_meta.env.MODE !== "test") {
31497
31562
  const hash3 = getSymbolHash2(symbolName);
31498
- const result = mapper[hash3];
31563
+ const result = !import_build14.isDev ? mapper[hash3] : getDevSegmentPath(mapper, hash3, symbolName, parent);
31499
31564
  if (!result) {
31500
31565
  if (hash3 === SYNC_QRL) {
31501
31566
  return [hash3, ""];
@@ -31504,9 +31569,6 @@ function createPlatform3(opts, resolvedManifest) {
31504
31569
  if (isRegistered) {
31505
31570
  return [symbolName, "_"];
31506
31571
  }
31507
- if (parent) {
31508
- return [symbolName, `${parent}?qrl=${symbolName}`];
31509
- }
31510
31572
  console.error("Cannot resolve symbol", symbolName, "in", mapper, parent);
31511
31573
  }
31512
31574
  return result;
@@ -31561,7 +31623,7 @@ var getSymbolHash2 = (symbolName) => {
31561
31623
  };
31562
31624
 
31563
31625
  // packages/qwik/src/server/utils.ts
31564
- var import_meta = {};
31626
+ var import_meta2 = {};
31565
31627
  function createTimer() {
31566
31628
  if (typeof performance === "undefined") {
31567
31629
  return () => 0;
@@ -31584,7 +31646,7 @@ function getBuildBase(opts) {
31584
31646
  }
31585
31647
  return base2;
31586
31648
  }
31587
- return `${import_meta.env.BASE_URL || "/"}build/`;
31649
+ return `${import_meta2.env.BASE_URL || "/"}build/`;
31588
31650
  }
31589
31651
  var versions = {
31590
31652
  qwik: globalThis.QWIK_VERSION,
@@ -31593,7 +31655,7 @@ var versions = {
31593
31655
 
31594
31656
  // packages/qwik/src/server/ssr-container.ts
31595
31657
  var import_core6 = require("../core.cjs");
31596
- var import_build15 = require("@qwik.dev/core/build");
31658
+ var import_build16 = require("@qwik.dev/core/build");
31597
31659
 
31598
31660
  // packages/qwik/src/server/scripts.ts
31599
31661
  var QWIK_LOADER_DEFAULT_MINIFIED = globalThis.QWIK_LOADER_DEFAULT_MINIFIED;
@@ -31606,7 +31668,7 @@ var QWIK_PREFETCH_DEBUG = globalThis.QWIK_PREFETCH_DEBUG;
31606
31668
 
31607
31669
  // packages/qwik/src/server/ssr-node.ts
31608
31670
  var import_core4 = require("../core.cjs");
31609
- var import_build14 = require("@qwik.dev/core/build");
31671
+ var import_build15 = require("@qwik.dev/core/build");
31610
31672
  var SsrNode = class {
31611
31673
  constructor(parentSsrNode, id, attributesIndex, cleanupQueue, vnodeData) {
31612
31674
  this.attributesIndex = attributesIndex;
@@ -31617,7 +31679,7 @@ var SsrNode = class {
31617
31679
  (_a = this.parentSsrNode) == null ? void 0 : _a.addChild(this);
31618
31680
  this.id = id;
31619
31681
  this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] : import_core4._EMPTY_ARRAY;
31620
- if (import_build14.isDev && id.indexOf("undefined") != -1) {
31682
+ if (import_build15.isDev && id.indexOf("undefined") != -1) {
31621
31683
  throw new Error(`Invalid SSR node id: ${id}`);
31622
31684
  }
31623
31685
  }
@@ -31937,7 +31999,7 @@ var expandBundles = (names, resolvedManifest) => {
31937
31999
  };
31938
32000
 
31939
32001
  // packages/qwik/src/server/preload-impl.ts
31940
- var import_meta2 = {};
32002
+ var import_meta3 = {};
31941
32003
  var simplifyPath = (base2, path) => {
31942
32004
  if (path == null) {
31943
32005
  return null;
@@ -31955,8 +32017,8 @@ var simplifyPath = (base2, path) => {
31955
32017
  };
31956
32018
  var getBase = (container) => {
31957
32019
  let base2 = container.$buildBase$;
31958
- if (import_meta2.env.DEV && !import_meta2.env.TEST) {
31959
- base2 = import_meta2.env.BASE_URL;
32020
+ if (import_meta3.env.DEV && !import_meta3.env.TEST) {
32021
+ base2 = import_meta3.env.BASE_URL;
31960
32022
  }
31961
32023
  return base2;
31962
32024
  };
@@ -31967,7 +32029,7 @@ var preloaderPre = (container, options, nonce) => {
31967
32029
  const preloaderBundle = simplifyPath(base2, (_a = resolvedManifest == null ? void 0 : resolvedManifest.manifest) == null ? void 0 : _a.preloader);
31968
32030
  let bundleGraphPath = resolvedManifest == null ? void 0 : resolvedManifest.manifest.bundleGraphAsset;
31969
32031
  if (bundleGraphPath) {
31970
- bundleGraphPath = (import_meta2.env.BASE_URL || "/") + bundleGraphPath;
32032
+ bundleGraphPath = (import_meta3.env.BASE_URL || "/") + bundleGraphPath;
31971
32033
  }
31972
32034
  if (preloaderBundle && bundleGraphPath && options !== false) {
31973
32035
  const preloaderOpts = typeof options === "object" ? {
@@ -32265,7 +32327,7 @@ var SSRContainer = class extends import_core6._SharedContainer {
32265
32327
  containerAttributes[QContainerAttr] = "paused" /* PAUSED */;
32266
32328
  containerAttributes[QRuntimeAttr] = "2";
32267
32329
  containerAttributes[QVersionAttr] = this.$version$ ?? "dev";
32268
- containerAttributes[QRenderAttr] = (qRender ? qRender + "-" : "") + (import_build15.isDev ? "ssr-dev" : "ssr");
32330
+ containerAttributes[QRenderAttr] = (qRender ? qRender + "-" : "") + (import_build16.isDev ? "ssr-dev" : "ssr");
32269
32331
  containerAttributes[QBaseAttr] = this.$buildBase$ || "";
32270
32332
  containerAttributes[QLocaleAttr] = this.$locale$;
32271
32333
  containerAttributes[QManifestHashAttr] = this.resolvedManifest.manifest.manifestHash;
@@ -32300,7 +32362,7 @@ var SSRContainer = class extends import_core6._SharedContainer {
32300
32362
  innerHTML = this.writeAttrs(elementName, varAttrs, false, currentFile);
32301
32363
  }
32302
32364
  this.write(" " + Q_PROPS_SEPARATOR);
32303
- import_build15.isDev && this.write('=""');
32365
+ import_build16.isDev && this.write('=""');
32304
32366
  if (constAttrs && constAttrs.length) {
32305
32367
  innerHTML = this.writeAttrs(elementName, constAttrs, true, currentFile) || innerHTML;
32306
32368
  }
@@ -32711,7 +32773,7 @@ var SSRContainer = class extends import_core6._SharedContainer {
32711
32773
  const qwikLoaderScript = getQwikLoaderScript({
32712
32774
  debug: this.renderOptions.debug
32713
32775
  });
32714
- const scriptAttrs = ["id", "qwikloader", "async", true];
32776
+ const scriptAttrs = ["id", "qwikloader", "async", true, "type", "module"];
32715
32777
  const nonce = (_a = this.renderOptions.serverData) == null ? void 0 : _a.nonce;
32716
32778
  if (nonce) {
32717
32779
  scriptAttrs.push("nonce", nonce);
@@ -32763,7 +32825,7 @@ var SSRContainer = class extends import_core6._SharedContainer {
32763
32825
  }
32764
32826
  this.unclaimedProjectionComponentFrameQueue.shift();
32765
32827
  this.openFragment(
32766
- import_build15.isDev ? [DEBUG_TYPE, "P" /* Projection */, QSlotParent, ssrComponentNode.id] : [QSlotParent, ssrComponentNode.id]
32828
+ import_build16.isDev ? [DEBUG_TYPE, "P" /* Projection */, QSlotParent, ssrComponentNode.id] : [QSlotParent, ssrComponentNode.id]
32767
32829
  );
32768
32830
  const lastNode = this.getOrCreateLastNode();
32769
32831
  if (lastNode.vnodeData) {
@@ -32812,7 +32874,7 @@ var SSRContainer = class extends import_core6._SharedContainer {
32812
32874
  }
32813
32875
  createAndPushFrame(elementName, depthFirstElementIdx, currentFile) {
32814
32876
  let tagNesting = 10 /* ANYTHING */;
32815
- if (import_build15.isDev) {
32877
+ if (import_build16.isDev) {
32816
32878
  if (!this.currentElementFrame) {
32817
32879
  tagNesting = initialTag(elementName);
32818
32880
  } else {
@@ -32888,7 +32950,7 @@ var SSRContainer = class extends import_core6._SharedContainer {
32888
32950
  let value = attrs[i];
32889
32951
  let styleScopedId = null;
32890
32952
  if (isSSRUnsafeAttr(key)) {
32891
- if (import_build15.isDev) {
32953
+ if (import_build16.isDev) {
32892
32954
  throw qError(32 /* unsafeAttr */);
32893
32955
  }
32894
32956
  continue;
@@ -32930,7 +32992,7 @@ var SSRContainer = class extends import_core6._SharedContainer {
32930
32992
  }
32931
32993
  if (tag === "textarea" && key === "value") {
32932
32994
  if (value && typeof value !== "string") {
32933
- if (import_build15.isDev) {
32995
+ if (import_build16.isDev) {
32934
32996
  throw qError(23 /* wrongTextareaValue */, [currentFile, value]);
32935
32997
  }
32936
32998
  continue;