eddev 2.0.0-beta.103 → 2.0.0-beta.104

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.
@@ -66,10 +66,16 @@ export async function getSsrStream(args) {
66
66
  controller.enqueue(new TextEncoder().encode(`\n<!-- ${JSON.stringify(assets)} -->\n`));
67
67
  for (const _asset of assets) {
68
68
  const asset = _asset;
69
- if (preloadAssets.has(asset.key))
69
+ // Ensure that each asset is only included once
70
+ const key = asset?.attrs?.key;
71
+ if (!key) {
72
+ throw new Error("Asset must have a key: " + JSON.stringify(asset));
73
+ }
74
+ if (preloadAssets.has(key))
70
75
  continue;
76
+ preloadAssets.add(key);
77
+ // Render the asset
71
78
  controller.enqueue(new TextEncoder().encode(renderToString(_jsx(Fragment, { children: renderAsset(asset) }))));
72
- preloadAssets.add(asset.key);
73
79
  }
74
80
  }
75
81
  // console.log("ASSETS", await clientManifest)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "2.0.0-beta.103",
3
+ "version": "2.0.0-beta.104",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",