@marko/vite 5.0.15 → 5.1.0
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.
- package/dist/index.mjs +5 -8
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -637,13 +637,10 @@ function renderAssets(slot) {
|
|
|
637
637
|
const slotWrittenEntriesKey = \`___viteWrittenEntries-\${slot}\`;
|
|
638
638
|
const lastWrittenEntry = this[slotWrittenEntriesKey] || 0;
|
|
639
639
|
const writtenEntries = (this[slotWrittenEntriesKey] = entries.length);
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
html += \`<script\${this.___viteInjectAttrs}>${opts.runtimeId ? `$mbp_${opts.runtimeId}` : "$mbp"}=\${JSON.stringify(base)}</script>\`
|
|
645
|
-
}
|
|
646
|
-
|
|
640
|
+
${opts.basePathVar ? `if (!this.___flushedMBP && slot !== "head-prepend") {
|
|
641
|
+
this.___flushedMBP = true;
|
|
642
|
+
html += \`<script\${this.___viteInjectAttrs}>${opts.runtimeId ? `$mbp_${opts.runtimeId}` : "$mbp"}=\${JSON.stringify(base)}</script>\`
|
|
643
|
+
}` : ""}
|
|
647
644
|
for (let i = lastWrittenEntry; i < writtenEntries; i++) {
|
|
648
645
|
let entry = entries[i];
|
|
649
646
|
|
|
@@ -805,7 +802,7 @@ function markoPlugin(opts = {}) {
|
|
|
805
802
|
let hydrateConfig;
|
|
806
803
|
const resolveVirtualDependency = (from, dep) => {
|
|
807
804
|
const normalizedFrom = normalizePath(from);
|
|
808
|
-
const query = `${virtualFileQuery}&id=${
|
|
805
|
+
const query = `${virtualFileQuery}&id=${encodeURIComponent(dep.virtualPath)}`;
|
|
809
806
|
const id = normalizedFrom + query;
|
|
810
807
|
if (devServer) {
|
|
811
808
|
const prev = virtualFiles.get(id);
|