@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.
Files changed (2) hide show
  1. package/dist/index.mjs +5 -8
  2. 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
- if(!this.___flushedMBP && slot !== "head-prepend") {
642
- this.___flushedMBP = true;
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=${Buffer.from(dep.virtualPath).toString("base64url") + path6.extname(dep.virtualPath)}`;
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/vite",
3
- "version": "5.0.15",
3
+ "version": "5.1.0",
4
4
  "description": "A Marko plugin for Vite",
5
5
  "keywords": [
6
6
  "loader",