@marko/vite 2.4.7 → 2.4.9

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.
@@ -7,6 +7,14 @@ static function renderAssets(slot) {
7
7
  const lastWrittenEntry = this[slotWrittenEntriesKey] || 0;
8
8
  const writtenEntries = (this[slotWrittenEntriesKey] = entries.length);
9
9
 
10
+ if(this.___viteBasePath && !this.___flushedMBP && slot !== "head-prepend") {
11
+ this.___flushedMBP = true;
12
+
13
+ html += `<script${this.___viteInjectAttrs}>${
14
+ this.___viteBaseVar
15
+ }=${JSON.stringify(this.___viteBasePath)}</script>`
16
+ }
17
+
10
18
  for (let i = lastWrittenEntry; i < writtenEntries; i++) {
11
19
  let entry = entries[i];
12
20
 
@@ -62,11 +70,5 @@ $ if (!out.global.___viteRenderAssets) {
62
70
  }
63
71
 
64
72
  <__flush_here_and_after__>
65
- <if(input.base && !out.global.___flushedMBP)>
66
- $ out.global.___flushedMBP = true;
67
- $!{`<script${out.global.___viteInjectAttrs}>${
68
- out.global.___viteBaseVar
69
- }=${JSON.stringify(input.base)}</script>`}
70
- </if>
71
73
  $!{out.global.___viteRenderAssets(input.slot)}
72
74
  </__flush_here_and_after__>
package/dist/index.js CHANGED
@@ -367,6 +367,7 @@ function markoPlugin(opts = {}) {
367
367
  chunksNeedingAssets: []
368
368
  });
369
369
  serverManifest.entries[entryId] = relativeFileName;
370
+ serverManifest.entrySources[relativeFileName] = source;
370
371
  entryData = JSON.stringify(entryId);
371
372
  } else {
372
373
  entryData = JSON.stringify(
@@ -395,9 +396,6 @@ function markoPlugin(opts = {}) {
395
396
  if (isSSR) {
396
397
  if (linked) {
397
398
  cachedSources.set(id, source);
398
- if (serverManifest && entryIds.has(id)) {
399
- serverManifest.entrySources[import_path.default.posix.relative(root, id)] = source;
400
- }
401
399
  }
402
400
  if (CJSTemplates == null ? void 0 : CJSTemplates.has(id)) {
403
401
  return createEsmWrapper(
package/dist/index.mjs CHANGED
@@ -347,6 +347,7 @@ function markoPlugin(opts = {}) {
347
347
  chunksNeedingAssets: []
348
348
  });
349
349
  serverManifest.entries[entryId] = relativeFileName;
350
+ serverManifest.entrySources[relativeFileName] = source;
350
351
  entryData = JSON.stringify(entryId);
351
352
  } else {
352
353
  entryData = JSON.stringify(
@@ -375,9 +376,6 @@ function markoPlugin(opts = {}) {
375
376
  if (isSSR) {
376
377
  if (linked) {
377
378
  cachedSources.set(id, source);
378
- if (serverManifest && entryIds.has(id)) {
379
- serverManifest.entrySources[path.posix.relative(root, id)] = source;
380
- }
381
379
  }
382
380
  if (CJSTemplates == null ? void 0 : CJSTemplates.has(id)) {
383
381
  return createEsmWrapper(
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.4.7",
4
+ "version": "2.4.9",
5
5
  "author": "Dylan Piercey <dpiercey@ebay.com>",
6
6
  "bugs": "https://github.com/marko-js/vite/issues",
7
7
  "dependencies": {