@marko/vite 2.2.11 → 2.2.12

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.
@@ -1,11 +1,11 @@
1
- static function renderAssets(out, slot) {
1
+ static function renderAssets(slot) {
2
2
  const entries = this.___viteEntries;
3
+ let html = "";
3
4
 
4
5
  if (entries) {
5
6
  const slotWrittenEntriesKey = `___viteWrittenEntries-${slot}`;
6
7
  const lastWrittenEntry = this[slotWrittenEntriesKey] || 0;
7
8
  const writtenEntries = this[slotWrittenEntriesKey] = entries.length;
8
- let html = "";
9
9
 
10
10
  for (let i = lastWrittenEntry; i < writtenEntries; i++) {
11
11
  const slotParts = entries[i][slot];
@@ -15,9 +15,9 @@ static function renderAssets(out, slot) {
15
15
  html += slotHtml;
16
16
  }
17
17
  }
18
-
19
- out.write(html);
20
18
  }
19
+
20
+ return html;
21
21
  }
22
22
 
23
23
  $ const $global = out.global;
@@ -27,5 +27,5 @@ $ if (!$global.___viteRenderAssets) {
27
27
  }
28
28
 
29
29
  <__flush_here_and_after__>
30
- $ $global.___viteRenderAssets(out, input.slot);
30
+ $!{$global.___viteRenderAssets(input.slot)}
31
31
  </>
@@ -1,11 +1,11 @@
1
- static function renderAssets(out, slot) {
1
+ static function renderAssets(slot) {
2
2
  const entries = this.___viteEntries;
3
+ let html = "";
3
4
 
4
5
  if (entries) {
5
6
  const slotWrittenEntriesKey = `___viteWrittenEntries-${slot}`;
6
7
  const lastWrittenEntry = this[slotWrittenEntriesKey] || 0;
7
8
  const writtenEntries = this[slotWrittenEntriesKey] = entries.length;
8
- let html = "";
9
9
 
10
10
  for (let i = lastWrittenEntry; i < writtenEntries; i++) {
11
11
  const manifest = __MARKO_MANIFEST__[entries[i]];
@@ -15,9 +15,9 @@ static function renderAssets(out, slot) {
15
15
  html += slotHtml;
16
16
  }
17
17
  }
18
-
19
- out.write(html);
20
18
  }
19
+
20
+ return html;
21
21
  }
22
22
 
23
23
  $ const $global = out.global;
@@ -27,5 +27,5 @@ $ if (!$global.___viteRenderAssets) {
27
27
  }
28
28
 
29
29
  <__flush_here_and_after__>
30
- $ $global.___viteRenderAssets(out, input.slot);
30
+ $!{$global.___viteRenderAssets(input.slot)};
31
31
  </>
@@ -31,7 +31,7 @@ var render_assets_transform_default = (tag, t) => {
31
31
  body.pushContainer("body", renderAssetsCall(t, tagName));
32
32
  };
33
33
  function renderAssetsCall(t, slot) {
34
- return t.expressionStatement(t.callExpression(t.memberExpression(t.memberExpression(t.identifier("out"), t.identifier("global")), t.identifier("___viteRenderAssets")), [t.identifier("out"), t.stringLiteral(slot)]));
34
+ return t.markoPlaceholder(t.callExpression(t.memberExpression(t.memberExpression(t.identifier("out"), t.identifier("global")), t.identifier("___viteRenderAssets")), [t.stringLiteral(slot)]), false);
35
35
  }
36
36
  module.exports = __toCommonJS(render_assets_transform_exports);
37
37
  // Annotate the CommonJS export names for ESM import in node:
@@ -8,7 +8,7 @@ var render_assets_transform_default = (tag, t) => {
8
8
  body.pushContainer("body", renderAssetsCall(t, tagName));
9
9
  };
10
10
  function renderAssetsCall(t, slot) {
11
- return t.expressionStatement(t.callExpression(t.memberExpression(t.memberExpression(t.identifier("out"), t.identifier("global")), t.identifier("___viteRenderAssets")), [t.identifier("out"), t.stringLiteral(slot)]));
11
+ return t.markoPlaceholder(t.callExpression(t.memberExpression(t.memberExpression(t.identifier("out"), t.identifier("global")), t.identifier("___viteRenderAssets")), [t.stringLiteral(slot)]), false);
12
12
  }
13
13
  export {
14
14
  render_assets_transform_default as default
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@marko/vite",
3
3
  "description": "A Marko plugin for Vite",
4
- "version": "2.2.11",
4
+ "version": "2.2.12",
5
5
  "author": "Dylan Piercey <dpiercey@ebay.com>",
6
6
  "bugs": "https://github.com/marko-js/vite/issues",
7
7
  "dependencies": {