@marko/vite 2.2.11 → 2.2.14
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(
|
|
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
|
-
$
|
|
30
|
+
$!{$global.___viteRenderAssets(input.slot)}
|
|
31
31
|
</>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
static function renderAssets(
|
|
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
|
-
$
|
|
30
|
+
$!{$global.___viteRenderAssets(input.slot)};
|
|
31
31
|
</>
|
package/dist/index.js
CHANGED
|
@@ -83,12 +83,7 @@ function markoPlugin(opts = {}) {
|
|
|
83
83
|
supportsTopLevelAwait: true,
|
|
84
84
|
supportsExportNamespaceFrom: true
|
|
85
85
|
}, (_a = opts.babelConfig) == null ? void 0 : _a.caller)
|
|
86
|
-
})
|
|
87
|
-
};
|
|
88
|
-
const ssrConfig = __spreadProps(__spreadValues({}, baseConfig), {
|
|
89
|
-
output: "html"
|
|
90
|
-
});
|
|
91
|
-
const domConfig = __spreadProps(__spreadValues({}, baseConfig), {
|
|
86
|
+
}),
|
|
92
87
|
resolveVirtualDependency(from, dep) {
|
|
93
88
|
const query = `${virtualFileQuery}&id=${encodeURIComponent(dep.virtualPath)}`;
|
|
94
89
|
const id = normalizePath(from) + query;
|
|
@@ -100,7 +95,12 @@ function markoPlugin(opts = {}) {
|
|
|
100
95
|
}
|
|
101
96
|
virtualFiles.set(id, dep);
|
|
102
97
|
return `./${import_path.default.basename(from) + query}`;
|
|
103
|
-
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const ssrConfig = __spreadProps(__spreadValues({}, baseConfig), {
|
|
101
|
+
output: "html"
|
|
102
|
+
});
|
|
103
|
+
const domConfig = __spreadProps(__spreadValues({}, baseConfig), {
|
|
104
104
|
output: "dom"
|
|
105
105
|
});
|
|
106
106
|
const hydrateConfig = __spreadProps(__spreadValues({}, domConfig), {
|
package/dist/index.mjs
CHANGED
|
@@ -46,12 +46,7 @@ function markoPlugin(opts = {}) {
|
|
|
46
46
|
supportsTopLevelAwait: true,
|
|
47
47
|
supportsExportNamespaceFrom: true
|
|
48
48
|
}, (_a = opts.babelConfig) == null ? void 0 : _a.caller)
|
|
49
|
-
})
|
|
50
|
-
};
|
|
51
|
-
const ssrConfig = __spreadProps(__spreadValues({}, baseConfig), {
|
|
52
|
-
output: "html"
|
|
53
|
-
});
|
|
54
|
-
const domConfig = __spreadProps(__spreadValues({}, baseConfig), {
|
|
49
|
+
}),
|
|
55
50
|
resolveVirtualDependency(from, dep) {
|
|
56
51
|
const query = `${virtualFileQuery}&id=${encodeURIComponent(dep.virtualPath)}`;
|
|
57
52
|
const id = normalizePath(from) + query;
|
|
@@ -63,7 +58,12 @@ function markoPlugin(opts = {}) {
|
|
|
63
58
|
}
|
|
64
59
|
virtualFiles.set(id, dep);
|
|
65
60
|
return `./${path.basename(from) + query}`;
|
|
66
|
-
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const ssrConfig = __spreadProps(__spreadValues({}, baseConfig), {
|
|
64
|
+
output: "html"
|
|
65
|
+
});
|
|
66
|
+
const domConfig = __spreadProps(__spreadValues({}, baseConfig), {
|
|
67
67
|
output: "dom"
|
|
68
68
|
});
|
|
69
69
|
const hydrateConfig = __spreadProps(__spreadValues({}, domConfig), {
|
|
@@ -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.
|
|
34
|
+
return t.markoTag(t.stringLiteral("_vite"), [t.markoAttribute("slot", t.stringLiteral(slot))], t.markoTagBody());
|
|
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.
|
|
11
|
+
return t.markoTag(t.stringLiteral("_vite"), [t.markoAttribute("slot", t.stringLiteral(slot))], t.markoTagBody());
|
|
12
12
|
}
|
|
13
13
|
export {
|
|
14
14
|
render_assets_transform_default as default
|
package/package.json
CHANGED